我需要一个可以首先打开rsa身份验证的url,然后打开jnlp.jsp文件的javascript。

到目前为止,我已经完成了此功能



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>





这就是我得到的



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

最佳答案

尝试将设置的超时行更改为关闭函数:

setTimeout(function(){
    window.location.href ="https://****:8443/jnlp.jsp?port=8443&protocol=https:&serverName=***&commonMaintenanceTool=false\"><img";
},10000);

09-25 21:07