function clickButton() {
var options = {
url: 'Default.aspx?type=query',
type:'post',
success: function (responseText) {
if (responseText.indexOf('success') >= 0) {
alert('abc');
} else
alert(responseText);
}
};
$("#form1").ajaxSubmit(options);
}
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script language="javascript" type="text/jscript" src="js/jquery-1.4.2-vsdoc.js"></script>
<script language="javascript" type="text/jscript" src="js/jquery.form.js"></script>
<script language="javascript" type="text/jscript" src="js/jquery-1.4.2.min.js"></script>
<script language="javascript" type="text/javascript">
function clickButton() {
var options = {
url: 'Default.aspx?type=query',
type:'post',
success: function (responseText) {
if (responseText.indexOf('success') >= 0) {
alert('abc');
} else
alert(responseText);
}
};
$('#form1').ajaxSubmit(options);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:DropDownList runat="server" ID="ddl1" Width="200px" OnSelectedIndexChanged="btnHideInitInvs_Click" AutoPostBack="true">
<asp:ListItem Text="无" Value="NONE"></asp:ListItem>
</asp:DropDownList>
<asp:PlaceHolder runat="server" ID="phInvs"></asp:PlaceHolder>
</div>
<asp:Button runat="server" ID="btnHideInitInvs" style="display:none" onclick="btnHideInitInvs_Click" />
<input type="button" value="click" onclick="clickButton()" />
</form>
</body>
</html>
<script language="javascript" type="text/jscript" src="js/jquery-1.4.2.min.js"></script>
<script language="javascript" type="text/jscript" src="js/jquery.form.js"></script>
<script language="javascript" type="text/jscript" src="js/jquery-1.4.2-vsdoc.js"></script>
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系我们删除。