<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table style="text-align:center;">
<tr>
<td><asp:Label ID="lbl1" runat="server" Text="姓名" /></td>
<td><asp:TextBox ID="txt1" runat="server" Width="100px" /></td>
<td><asp:Label ID="lb12" runat="server" Text="职业" /></td>
<td><asp:TextBox ID="txt2" runat="server" Width="100px" /></td>
</tr>
<tr>
<td align="right" colspan="4">
<asp:Button ID="buttonReset1" runat="server" Text="清空一" OnClientClick="return Reset1()"/>
<asp:Button ID="buttonReset2" runat="server" Text="清空二" OnClientClick="return Reset2()"/></td>
</tr>
</table>
</div>
</form>
</body>
<script type="text/javascript">
function Reset1() {
document.getElementById("<%=txt1.ClientID%>").value = "";
document.getElementById("<%=txt2.ClientID%>").value = "";
return false;
}
function Reset2() {
this.document.location = this.document.location;
return false;
}
</script>
</html>原文:http://blog.csdn.net/yysyangyangyangshan/article/details/43344485