這是好久以前做的測試,結果有些記不清了,拿出來在溫習下。也順便讓大家找找有問題沒。
只有一個input,斷行符號自動認可表單<br /><form method="post" action="a.html" target="_blank"><br /><input type="text" name="qqq"/><br /></form><br />只有一個input和一個submit,斷行符號自動認可表單<br /><form method="post" action="a.html" target="_blank"><br /><input type="text" name="qqq"/><br /><input type="submit"/><br /></form><br />只有一個input和一個button,斷行符號自動認可表單<br /><form method="post" action="a.html" target="_blank"><br /><input type="text" name="qqq"/><br /><button>提交</button><br /></form><br />有兩個input和一個submit,斷行符號自動認可表單<br /><form method="post" action="a.html" target="_blank"><br /><input type="text" name="qqq"/><br/><br /><input type="text" name="www"/><br /><input type="text" name="textfield2" style="display:none" mce_style="display:none"/><br /><input type="submit"/><br /></form><br />有兩個input和一個button,firefox斷行符號自動認可表單,ie不自動認可<br/><br /><form method="post" action="a.html" target="_blank"><br /><input type="text" name="qqq"/><br/><br /><input type="text" name="www"/><br /><button onclick="subForm()">提交</button><br /><!--<input type="button" value="提交" onclick="subForm()"/>--><br /></form><br />有兩個input和一個input button,firefox斷行符號不自動認可表單,ie不自動認可<br/><br />表單中加一個隱藏的submit後,firefox斷行符號自動認可表單,ie不自動認可<br/><br /><form method="post" action="a.html" target="_blank"><br /><input type="text" name="qqq"/><br/><br /><input type="text" name="www"/><br /><!--<input type="submit" name="Submit2" value="提交" style="display:none;" mce_style="display:none;"/>--><br /><input type="button" value="提交" onclick="subForm()"/><br /></form><br />有兩個input和一個input button,firefox ie 都不自動認可<br /><form name='frm' method="post" action="a.html" target="_blank"><br /><input type="text" name="qqq"/><br/><br /><input type="text" name="www"/><br /><input type="button" value="提交" onclick="frm.submit();"/><br /></form></p><p><!--<input type="submit"/><br /><button>提交</button><br /><input type="text" name="textfield2" style="display:none" mce_style="display:none"/><br /><input type="button" value="提交" onclick="frm.submit();"/>--></p><p><mce:script type="text/javascript"><!--<br />function subForm(){<br />alert("");<br />}<br />// --></mce:script><br />//onsubmit="return false;"<br /><form method="get" action="a.html" target="_blank" onsubmit="return false;"><br /><input type="text" name="www"/><br /><button>提交</button><br /><input id="searchBox_forceForm_submit" type="submit"><br /></form>