function fakeProgress(v, el) {
if (v > 100) var bool = window.confirm("是否同意公司的保密协议?");
if (bool){
var url = '${pageContext.request.contextPath}/userRights.do?menu=jurisdiction&userCode=' + userCode;
doSubmit(url);
}
else { setSB(v, el); window.setTimeout("fakeProgress(" + (++v) + ", document.all['" + el.id + "'])", 20); }javascript函数中能跳转到SSH中action中吗?(我的是错误的,请高手指点,依然在线等)
if (v > 100) var bool = window.confirm("是否同意公司的保密协议?");
if (bool){
var url = '${pageContext.request.contextPath}/userRights.do?menu=jurisdiction&userCode=' + userCode;
doSubmit(url);
}
else { setSB(v, el); window.setTimeout("fakeProgress(" + (++v) + ", document.all['" + el.id + "'])", 20); }javascript函数中能跳转到SSH中action中吗?(我的是错误的,请高手指点,依然在线等)
解决方案 »
- ADSL的密码取消了可不可以?
- tomcat挂起死机
- hibernate 多表查询 返回集合
- 请教高手一个问题!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- servlet基本理解问题-----------热心的人过来帮帮忙
- 导出csv文件的问题
- 刚写的主页,帮我测试一下是不是能正常访问.(http://cyhweb.126.com)
- jsp使用javabean实现分页问题?帮我测试,谢谢
- 为何 import javax.servlet.*; 总是失败,应该在classpath中加载那些东东?
- 关于JSP页面校验问题!
- getHibernateTemplate()为null的处理办法
- js中怎样判断当前按住了几个键(按住没松开的键)
感谢上面各位大佬的回帖。
function fakeProgress(v, el) {
if (v > 100){
window.location.href='/userRights.do?menu=jurisdiction&userCode'+userCode; }
else { setSB(v, el); window.setTimeout("fakeProgress(" + (++v) + ", document.all['" + el.id + "'])", 20); }
这种方式需要http打头
jsp把下面几个值打印出来看看,你就知道怎么办了
String url = request.getRequestURL().toString();
String path = url.substring(0, url.lastIndexOf("/"));
String url1 = request.getContextPath();
String root = url.substring(0, url.indexOf(url1));
js里有错误呗,用firebug调试下看看那里错了,另外url最好加上basepath,而不要用相对路径。
<%@page import="java.util.List"%>
<%@page import="com.baidu.manageSystem.machineRoom.dto.Users"%><%
Users userCode=(Users)request.getAttribute("userCode");
%>
<html><head><title>正在载入...</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<script language="javascript"> function setSB(v, el) { var ie5 = (document.all && document.getElementsByTagName); if (ie5 || document.readyState == "complete") { filterEl = el.children[0]; valueEl = el.children[1]; filterEl.style.width = v + "%"; valueEl.innerText = v + "%"; } } function fakeProgress(v, el) {
if (v > 100){
window.location.href='/userRights.do?menu=jurisdiction&userCode=?'+userCode;
}
else { setSB(v, el); window.setTimeout("fakeProgress(" + (++v) + ", document.all['" + el.id + "'])", 20); } } </script>
<body onload="fakeProgress(0, sb)" topmargin=180 bgcolor=#eeeeee >
<center>
<form action="">
<font color=gray> <p align=center style="color: #0085dd; font-family: ??ì?; font-szie:12px; line-height: 100%">读取数据中,请耐心等待</p></font><span id=sb style="width: 300px"><div style="filter: Alpha(Opacity=0, FinishOpacity=60, style=1, StartX=0, StartY=0, FinishX=100, FinishY=0); width: 0%; height: 12px; position: absolute; background: #9999ff"></div><div style="font-size: 12px; width: 100%; color: #ff3333; font-family: arial; text-align: center"></DIV>
</p></td></form></tr></table></body></html>
这是我那页面代码 不知道哪错了,高手们麻烦给看下