62,268
社区成员
发帖
与我相关
我的任务
分享
<asp:TextBox ID="txtPostalcode" runat="server"></asp:TextBox>
<asp:Button ID="btnAddress" runat="server" UseSubmitBehavior="false" Text="查询"
OnClientClick="GetInfo();return false;" />
<script language="javascript" type="text/javascript">
function GetInfo(object)
{
var postalCode = document.getElementById("txtPostalcode").value;
var result = MemberCustomerAdd .GetPostal(postalCode).value;
// 然后根据需求来处理result
}
</script>
public partial class MemberCustomerAdd
{
[AjaxMethod]
public string GetPostal(string postCode)
{
string strResult="";
// 你需要的处理过程
return strResult;
}
}