是否有任何理由为什么下面将无法正常工作,它似乎在每个场景中工作,除了下面的一个:原型函数没有被调用
我的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。
Example of asp rendered in html + prototypejs bizarrely not working.
在它不工作的方式是什么? – Dancrumb
由于在点击功能不会运行/调用/调用。 – Anicho