<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>
|