我的问题是当我单击带有 id="cmdAddATM" 整个 .aspx 页面重新加载的按钮时。即使我没有编写任何与之关联的单击功能。问题是什么?因为这个问题在我的项目中引起了一些与 ajax/jquery 相关的新问题
文件名:AddEditATM.aspx.cs
namespace Monitoring_Tool
{
public partial class AddEditATM : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Generix.fillDropDown(ref litRegion, Generix.getData("dbo.Region", "REGION, Code", "", "", "Code", 1));
}
}
}
文件:AddEditATM.aspx
<script language="javascript" type="text/javascript">
$(document).ready(function() {
showAddEditATMLoad();
});
</script>
<body>
// I an not writing full syntax here but i have one button with id "cmdAddATM"
</body>
外部 JS 文件:
function showAddEditATMLoad() {
//Its Blank
}
我的 HTML 代码:-
<table style="margin: 0px auto; width: 90%" runat="server">
<thead>
<tr>
<th colspan="4" align="center" class="ui-widget-header PageHeader">
ADD/EDIT ATM
</th>
</tr>
</thead>
<tbody style="vertical-align: bottom; border-style: solid; border-width: thick;">
<tr>
<td style="padding-left: 5px" colspan="2">
Enter ATM ID <input id="txtEditATM" name="txtEditATM" type="text" />
<button id="cmdEditATM">
EDIT ATM</button>
</td>
<td align="left" style="font-weight: bold" colspan="1">
OR
</td>
<td align="center" colspan="2">
<button id="cmdAddATM">
ADD ATM</button>
</td>
</tr>
</tbody>
</table>