悬赏园豆:20
[已解决问题]
解决于 2008-01-24 17:48
有人告诉我解决方法是:<BR>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG alt="" src="http://space.cnblogs.com/Images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000"><</SPAN><SPAN style="COLOR: #000000">asp:TextBox ID</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">TextBox1</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000"> runat</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">server</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000"> onkeydown</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #800000">if(event.keyCode==13){document.getElementById('Button1').click();}</SPAN><SPAN style="COLOR: #800000">"</SPAN><SPAN style="COLOR: #000000">></</SPAN><SPAN style="COLOR: #000000">asp:TextBox</SPAN><SPAN style="COLOR: #000000">></SPAN></DIV>试了一下还是不行,因为enter的时候虽然是执行了onkeydown的程序,但同时默认的提交也触发了。