我需要一个javascript,可以先打开一个URL进行rsa身份验证,然后打开jnlp.jsp文件。
到目前为止,我一直致力于此功能
function open_win() {
window.open("http://ppsaccess/");
setTimeout("window.location.href =\"https://****:8443/jnlp.jsp?port=8443&protocol=https:&serverName=***&commonMaintenanceTool=false\"><img",10000);
}
</script>
&#13;
这就是我得到的
<html>
<head>
<script type="text/javascript">
function open_win() {
window.open("http://ppsaccess/");
}
setTimeout(function(){
window.location.href ="https://***:8443/jnlp.jsp?port=8443&protocol=https:&serverName=***&commonMaintenanceTool=false\";
},10000);
</script>
</head>
<body>
<form>
<input type=button value="PR1" onclick="open_win()">
</form>
</body>
</html>
&#13;
答案 0 :(得分:0)
尝试将设置超时行更改为闭包功能:
setTimeout(function(){
window.location.href ="https://****:8443/jnlp.jsp?port=8443&protocol=https:&serverName=***&commonMaintenanceTool=false\"><img";
},10000);