我有一個Jquerymobile彈出窗口(在asp.net網站),並在其中我有一個簡單的textarea和提交按鈕。 提交按鈕事件後,我想要做某些事情。 textarea上的驗證(如果爲空)顯示帶有錯誤消息的文字。 如果成功,然後顯示一封感謝信息和關閉按鈕。 所有這些都必須在彈出窗口打開的情況下完成(提交之後)。JqueryMobile彈出後回發
問題是,提交DOM後刷新並彈出框關閉。
<div class="feedback-text">
<a href="#feedback" data-rel="popup">Feedback</a>
</div>
<div data-role="popup" id="feedback" data-overlay-theme="a" data-position-to="window">
<a href="#" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-right">Close</a>
<div class="feedback-field-wrapper">
<asp:TextBox ID="txtFeedback" runat="server" Text="*feedback" cssclass="form-first-name" TextMode="MultiLine" Rows="3"></asp:TextBox>
</div>
<center>
<div class="errormsg-feedback"><asp:literal ID="ltError" runat="server" Text="test" Visible="false"></asp:literal></div>
<asp:Button ID="btnFeedback" runat="server" Text="Submit" data-ajax="false"
data-icon="arrow-r" style="width:150px;" data-inline="true" /></center>
</div>
你們是否會建議在提交後保持彈出框打開狀態?
謝謝。
可能u顯示一些代碼,請?你只能使用'localStorage'來做到這一點。有沒有其他的方式 – krishgopinath
感謝您的興趣,我只是添加了代碼。 – SSiddiqui