js在调用时候可以分:绝对路径、相对路径。
<script type="text/javascript">
function test(){
window.location.href='HelpInfo_queryHelpInfoList?initMethod=iquery';
//window.location.href=
'/b2cPlatform/HelpInfo_queryHelpInfoList?initMethod=iquery';
}
</script>
</head>
<body>
<div> <input type="button" onclick="test()" value="testaaaaaa"/></div>
</body>
</html>
1.绝对路径:
<a href="/b2cPlatform/HelpInfo_queryHelpInfoList?initLoadMethod=iquery">testbbbbb</a>
2.相对路径:
<a href="HelpInfo_queryHelpInfoList?initLoadMethod=iquery">testbbbbb</a>
http://jun1986.iteye.com/blog/1198669