1.所有的在creat form里面的input有三十二个还有一个select,是否都应该post提交,具体如下:
2.submit型的input不用post吧?
3.hidden并且值为空的怎么处理?我选择不post行不行?
4.值为空的checkbox怎么处理?post还是不?值为1和0?
5. <input type="text" name="ownquestion" id="ownquestion" size="53" value="" style="display:none;" />
像上面这样的该如何处理post?
6.还有这个: <input type="text" name="IdentityAnswer" id="IdentityAnswer" size="53" value="" autocomplete="off" />
问题如上.
7.button按钮的input需要post吗?比如: <input type="button" key="checkavail" onclick="getAvailableNames()"
style="font-size:9pt"
value="check availability!">
2.submit型的input不用post吧?
3.hidden并且值为空的怎么处理?我选择不post行不行?
4.值为空的checkbox怎么处理?post还是不?值为1和0?
5. <input type="text" name="ownquestion" id="ownquestion" size="53" value="" style="display:none;" />
像上面这样的该如何处理post?
6.还有这个: <input type="text" name="IdentityAnswer" id="IdentityAnswer" size="53" value="" autocomplete="off" />
问题如上.
7.button按钮的input需要post吗?比如: <input type="button" key="checkavail" onclick="getAvailableNames()"
style="font-size:9pt"
value="check availability!">
如果hidden值为空,那么这个hidden也就没有了存在的意义
checkbox也一样,到另一个页面的时候可以通过一个数组来取到它们的值
5和6都是可以用POST的,到另一个页面的时候可以通过它们的名字来取到它们的值
不明白7是什么意思
一个button按钮有提交的必要吗?提交了有什么意思呢??照7的代码看button的作用不外呼是点击后触发一个函数getAvailableNames(),
为什么要把它提交呢?
http://localhost:8080/A/User.do?action=b&&id=1&&username=shao&&....会显示出来。而post则不会出现这样的情况。
比如:http://localhost:8080/A/User.do?action=b只会显示这样。