function quxiantu(plateNum){ //创建一个表单元素 var myform = document.createElement("form"); //创建一个input元素 var plateNumElement = document.createElement("input"); plateNumElement.type = "hidden"; plateNumElement.value = plateNum; plateNumElement.name = "plateNum"; myform.action = "${path}/mileageStat_quxiantu.action"; myform.method="post"; window.open ("", "win", "width=600, height=400, top=100, left=300, toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no, status=no"); myform.target = "win"; //把创建的myform放到body里 document.body.appendChild(myform); //把创建的元素放到myform里 myform.appendChild(plateNumElement); //表单提交 myform.submit(); }
<input type="submit" value="查看" οnclick="quxiantu('${vehicle.plateNum}')">