javaer 2012-09-07
有的时候在vm页面中,在通过jquery post方式请求完,比如说保存表单的数据,处理返回成功的提示后,直接跳转到编辑页面对应的详情页面看刚才的表单详情信息时,就需要用到js的跳转方式:
按钮式:
<INPUT name="pclog" type="button" value="GO" onClick="location.href='http://www.ddhbb.com/'">
链接式:
<a href="javascript:history.go(-1)">返回上一步</a>
直接跳转式:
var riskId = $("#riskId").val();
window.location.href="/casedetails.action?riskid="+riskId;
开新窗口:
<a href="javascript:" onClick="window.open('http://www.ddhbb.com/blog/guestbook.asp','','height=500,width=611,scrollbars=yes,status=yes')">休息休息</a>
又如:
-------
<script language="javascript">
window.navigate("top.jsp");
</script>
---------
<scriptlanguage="JavaScript">
self.location=’top.htm’;
</script>
--------
<scriptlanguage="javascript">
alert("非法访问!");
top.location=’xx.jsp’;
</script>--------
<script language="javascript">
functionlogout(){
if(confirm("你确定要注销身份吗?是-选择确定,否-选择取消")){
window.location.href="logout.asp?act=logout"
}
}
</script>