以下是否有任何原因不起作用,它似乎适用于除以下情况之外的所有情况:
我的 html/asp.net
<div class="submitContainerConfirm" id="submit_Div">
<asp:PlaceHolder runat="server" id="phContinue">
<asp:ImageButton CausesValidation="false" CssClass="ShowPleaseWait button" runat="server" ID="ibtnContinue" OnClick="ibtnContinue_OnClick" />
</asp:PlaceHolder>
</div>
我的原型
function pageLoad() {
$$(".ShowPleaseWait").each(function (el) {
el.observe("click", function (event) {
if (Page_IsValid) {
el.hide();
el.insert({ after: '<img src="/content/images/processing.gif" /> Please Wait...' });
alert('Is Valid');
}
alert('Is not Valid');
});
});
}
尝试二:
Event.observe(window, 'load', function () {
Event.observe("click", function (event) {
if (Page_IsValid) {
event.hide();
event.insert({ after: '<img src="/content/images/processing.gif" /> Please Wait...' });
alert('Is Valid');
}
alert('Is not Valid');
});
Event.observe("click", function (event) {
if (Page_IsValid) {
event.hide();
event.insert({ after: '<img src="/content/images/processing.gif" /> Processing...' });
alert('Is Valid');
}
alert('Is not Valid');
});
});
// 这也不起作用。请不要jquery。