题
我目前试图创建blockui 300个实例
目前这只能通过完成复制并粘贴:
例如:
<script type="text/javascript">
$(document).ready(function() {
$('#t1').click(function() {
$.blockUI({ message: $('#q1'), css: { width: '1024px' } });
});
$('#yes1').click(function() {
// update the block message
$.blockUI({ message: "<h1>Remote call in progress...</h1>" });
$.ajax({
url: 'wait.php',
cache: false,
complete: function() {
// unblock when remote call returns
$.unblockUI();
}
});
});
$('#no1').click(function() {
$.unblockUI();
return false;
});
});
</script>
<script type="text/javascript">
$(document).ready(function() {
$('#t2').click(function() {
$.blockUI({ message: $('#q2'), css: { width: '1024px' } });
});
$('#yes2').click(function() {
// update the block message
$.blockUI({ message: "<h1>Remote call in progress...</h1>" });
$.ajax({
url: 'wait.php',
cache: false,
complete: function() {
// unblock when remote call returns
$.unblockUI();
}
});
});
$('#no2').click(function() {
$.unblockUI();
return false;
});
});
</script>
任何人都可以提出一个更快的方法?
不隶属于 StackOverflow