【发布时间】:2014-02-11 06:09:51
【问题描述】:
自从我上次使用 JQUERY-UI 制作网站以来已经有一段时间了。我有一个 aspx 页面,我正在尝试在点击
时添加一个弹出模式但是当我单击按钮时它会触发“提交”,如何防止提交?它显示弹出窗口 2 秒,然后发生“提交”。
这里是html代码
<div id="dialog-form" title="Create new user">
<p class="validateTips">All form fields are required.</p>
<form>
<fieldset>
<label for="name">Name</label>
<input type="text" name="name" id="name" class="text ui-widget-content ui-corner-all">
<label for="email">Email</label>
<input type="text" name="email" id="email" value="" class="text ui-widget-content ui-corner-all">
<label for="password">Password</label>
<input type="password" name="password" id="password" value="" class="text ui-widget-content ui-corner-all">
</fieldset>
</form>
</div>
<div id="users-contain" class="ui-widget">
<h1>Existing Users:</h1>
<table id="users" class="ui-widget ui-widget-content">
<thead>
<tr class="ui-widget-header ">
<th>Name</th>
<th>Email</th>
<th>Password</th>
</tr>
</thead>
<tbody>
<tr>
<td>John Doe</td>
<td>john.doe@example.com</td>
<td>johndoe1</td>
</tr>
</tbody>
</table>
</div>
<button id="create-user">Create new user</button>
【问题讨论】:
标签: c# jquery asp.net jquery-ui popup