求js 打开1个网页直接弹出一个输入框,然后点个确认,弹出另外1个网页。 JS 网页弹出对话框,可以自定义一段文字,点击"确定"后转到...

\u6253\u5f00\u4e00\u4e2a\u65b0\u7684\u7f51\u9875\u603b\u662f\u8df3\u51fa\u8fd9\u4e2aC.JS\u7684\u4e0b\u8f7d\u5b57\u8282\uff0c\u600e\u4e48\u89e3\u51b3

\u8fd9\u662f\u4e00\u4e2a\u63d2\u4ef6 \u4e0d\u7ba1\u5c31\u884c\u4e86 \u4e5f\u4e0d\u77e5\u9053\u662f\u4ec0\u4e48\u63d2\u4ef6 \u53ea\u6709\u4e0d\u5f71\u54cd\u770b\u7f51\u9875\u5c31\u4e0d\u7ba1\u4ed6

\u4e0d\u7528\u5b9a\u4e49\u65b9\u6cd5function\uff0c\u76f4\u63a5\u8fd9\u6837\u5199



if(confirm("\u786e\u8ba4\uff1f")){
location.href="a.jsp";
}else{
window.close();
}



\u90a3\u4e2aa.jsp\u4f60\u53ef\u4ee5\u968f\u4fbf\u6539\uff0c\u60f3\u8df3\u54ea\u5c31\u8df3\u54ea\u3002


\u7ed9\u91c7\u7eb3\u5440\u54e5\u4eec\uff01

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
function inputWebAddress() {
var webAddress = prompt("请输入网址:");
if(webAddress){
if(webAddress.trim().substring(0,7) != "http://"){
webAddress = "http://" + webAddress;
}
location.href=webAddress;
}
}
</script>
</head>
<body onload="inputWebAddress();">
</body>
</html>
打开这个网页之后会弹出输入框,输入网址之后确认,弹出你输入的网页

扩展阅读:网站服务器入口 ... 点击打开发布页 ... javascript免费网站 ... 永久不收费免费的聊天软件 ... 跳转进入 ... jsgame游戏网站入口 ... 点击打开网页 ... js跳转网页 ... js跳转打开新窗口 ...

本站交流只代表网友个人观点,与本站立场无关
欢迎反馈与建议,请联系电邮
2024© 车视网