当前位置: 代码迷 >> Web前端 >> JQuery Blockui遮罩效能
  详细解决方案

JQuery Blockui遮罩效能

热度:32   发布时间:2012-11-06 14:07:00.0
JQuery Blockui遮罩功能

.jsp 面内 实现 (写在 <head> </head>

<script type="text/javascript" src=" <s:url value="/js/jquery-1.3.2.js" />" ></script>

<script type="text/javascript" src=" <s:url value="/js/jquery.js" />" ></script>

<script type="text/javascript" >

??? $(document).ready(function () {?

??????? $( #test’).click(function () { <!--test,question no 控件的 id-->

??????????? $.blockUI({ message: $( #question’),

<!-- 遮罩 面, id question 的控件 -->

??????????? css: {

??????????????? top:? ($(window).height() - 500) /2 + 'px',

??????????????? left: ($(window).width() - 700) /2 + 'px',

??????????????? width: '700px'?

??????????????? } <!--css -->

??????????? });????????????

??????? });?

??????? $( #no’).click(function () {

??????????? $.unblockUI(); <!-- click? id no 的控件,解除 面遮罩 -->

??????????? return false ;

??????? });

});

</script>

注: id question no 的控件可以是 藏的

Example:<div id="question" style="cursor: default; display: none;" > </div>

?

  相关解决方案