我已经多次使用这个插件,方式与这里看到的非常相似,但我最新的实现不起作用。
这是JavaScript:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script src="js/jquery.blockUI.js" type="text/javascript"></script>
<script type="text/javascript">
function disableButtons(){
alert('TEST'); //this is here just to see if the function is called
$('div.blockbutton').block({
message: '<h4>Saving...</h4>',
css: { border: '2px solid orange' }
});
}
</script>
和 HTML:
<div align="center" class="blockbutton">
<input name="save" type="button" class="btn6022" value="Save"
onClick=disableButtons();
<c:if test='${(sessionScope.package != "NWR")}'>
saveConfirm1(onset_date,report_date,lost_consciousness_date,fatal_death_date);">
</c:if>
<c:if test='${(sessionScope.package == "NWR")}'>
"saveConfirm2(onset_date,report_date,fatal_death_date);">
</c:if>
</div>
这是我的 Firebug 控制台在触发该功能时给我的信息:TypeError: $(...).block is not a function [Break On This Error]
CSS:{边框:'2px纯橙色'}
我很困惑,因为这段代码与我在其他页面上所做的相同,没有失败。有人可以在这里发现我失踪的问题吗?