使用javaScript技术和struts重写技术在连接上加参数了解答

zhaow 2010-03-09

这里是js完整写法,你可以直接copy过去使用

<scriptlanguage="javascript"type="text/javascript">

functionopenWin(f,n,w,h,s){

sb=s=="1"?"1":"0";

l=(screen.width-w)/2;

t=(screen.height-h)/2;

sFeatures="left="+l+",top="+t+",height="+h+",width="+w

+",center=1,scrollbars="+sb+",status=0,directories=0,channelmode=0";

openwin=window.open(f,n,sFeatures);

if(!openwin.opener)

openwin.opener=self;

openwin.focus();

returnopenwin;

}

</script>

这里是运用js和struts重写技术在连接上添加method参数和id参数:

<ahref="#"onclick="javaScript:openWin('<html:rewriteaction="/control/person/manage"/>?method=addInput','selectOrgs',930,719,1);">添加人员信息</a>

相关推荐