在jsp中怎样获得input元素的属性
例如:
<body>
<form id= "Form1 " method= "get " action= "servlet1.do ">
<input type= "text " maxlength= "10 " size= "20 " value= "sadfasdfa " name= "T1 " id= "T1 "/>
<button >
<jsp:setProperty name= "type " property= "submit " /> ok </button>
</form>
test:${T1.size}
</body>
</html>
问:怎样获得T1的size属性???着急
------解决方案--------------------Form1.getT1();就可以了吧
------解决方案-------------------- <script>
alert(document.Form1.T1.size);
</script>
或者试试document.Form1.T1.offsetWidth;
------解决方案--------------------用input hidden来保存提交.