2 回答
刚毅87
TA贡献345条经验 获得超309个赞
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <input type="button" id="inp" value="网址"/> </body> <script type="text/javascript"> var inp = document.getElementById('inp'); inp.onclick = function () { var name = prompt('请输入网址',''); window.location.href = name; } </script> </html>
望采纳!
添加回答
举报
0/150
提交
取消