日期:2014-05-18 浏览次数:20783 次
<html>
<script type="text/javascript">
</script>
<body>
<input type="button" value="跳转" onclick="window.location.href='http://www.baidu.com'"/>
<a onclick="window.location.href='http://www.baidu.com';void 0" href="#"> 点击这里 </a>
</body>
</html>
<a href="javascript:void(0);" onclick="isLogon('addAction?pid=<s:property value="#product.pid"/>')">加入购物车</a>
<script type="text/javascript">
function isLogon(path){
var name=document.getElementById("name").value;
if(name==null) //即使设为true 还是一样
window.location.href="/jsp/log.jsp";
}else{
window.location.href=path;
}
</script>