为按钮绑定实现js跳转
页面代码
<button type="button" class="btn btn-xs btn-info" id="add" name="add" onclick="addNewProduct()"><i class="fa fa-plus"></i> 新增</button>
js代码
<script type="text/javascript">
  	// 添加商品
  	function addNewProduct(){
  		window.location.href = "${pageContext.request.contextPath }/product?method=addNewProduct";
  	}
</script>
                    
                
                
            
        
浙公网安备 33010602011771号