展开全部
<html>
<head>
<script language="javascript">
function Open(){
var url = document.getElementById("url").value;
window.open (url);
}
</script>
</head>
<body>
<input type="text" id="url" value=" http://baidu.com"/>
<input type="button" value="submit" onclick="Open()">
</body>
</html>
<head>
<script language="javascript">
function Open(){
var url = document.getElementById("url").value;
window.open (url);
}
</script>
</head>
<body>
<input type="text" id="url" value=" http://baidu.com"/>
<input type="button" value="submit" onclick="Open()">
</body>
</html>
展开全部
<script type="text/javascript">
function gourl(){
if (document.getElementById('url').value!="" && document.getElementById('url').value!=null){
window.location.href = "http://" + document.getElementById('url').value;
}else{}
}
</script>
http://<input type="text" id="url" />
<input type="button" onclick="gourl()" value="提交" />
function gourl(){
if (document.getElementById('url').value!="" && document.getElementById('url').value!=null){
window.location.href = "http://" + document.getElementById('url').value;
}else{}
}
</script>
http://<input type="text" id="url" />
<input type="button" onclick="gourl()" value="提交" />
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询