验证中...
Languages: Java
Categories: jQuery 插件
Latest update 2019-03-17 14:25
js的几种跳转
Raw Copy
<input type="button" value="Location" onclick="Location()"/>
<input type="button" value="Navigate" onclick="Navigate()"/>
<script type="text/javascript">
function Location() {
window.location.href = "http://localhost:2416/Test/Index";
}
function Navigate() {
window.navigate("http://blog.csdn.net/liweizhong193516");
}//只兼容与IE浏览器
function Replace() {
window.replace("http://blog.csdn.net/liweizhong193516");
}
</script>
第二种
<span style="font-size:18px;">request.getRequestDispatcher("1.jsp").forward(request,response);</span>
<input type="button" value="Location" onclick="Location()"/>
<script type="text/javascript">
function Location() {
window.location.href = "http://blog.csdn.net/liweizhong193516";
}
window.onload = function () {
window.replace("http://blog.csdn.net/liweizhong193516");
}
</script>

Comment list( 0 )

You need to Sign in for post a comment

Help Search

183227_9af5e6a8_1826025 111910_4d91f001_1826025