日期:2014-05-17 浏览次数:20434 次
<script type="text/javascript"> function test() { var t1 = document.getElementById("editContent"); var t2 = document.getElementById("editDiscription"); t2.value = t1.value; } </script> <form id="form1" runat="server"> <div> <asp:TextBox ID="editContent" runat="server"></asp:TextBox> <asp:TextBox ID="editDiscription" runat="server"></asp:TextBox> </div> </form>
protected void Page_Load(object sender, EventArgs e) { editContent.Attributes.Add("onkeyup","test()"); editDiscription.Attributes.Add("onblur","test()"); }