展开全部
<html>
<head>
<script type="text/javascript">
function myLinkFor() {
var newURL = document.getElementById("targetURL").value;
window.location.href = "http://" + newURL;
}
</script>
</head>
<body>
请输入网址:<input type="text" id="targetURL" /><input type="button" name="myBtn" value="确定" onclick="javascript:myLinkFor()" />
</body>
</html>
<head>
<script type="text/javascript">
function myLinkFor() {
var newURL = document.getElementById("targetURL").value;
window.location.href = "http://" + newURL;
}
</script>
</head>
<body>
请输入网址:<input type="text" id="targetURL" /><input type="button" name="myBtn" value="确定" onclick="javascript:myLinkFor()" />
</body>
</html>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询