jquery.blockui示例
各種樣式、方法等,來源:http://qincidong.blog.163.com/blog/static/1646672192010634317555/
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”>
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME=”Generator” CONTENT=”EditPlus”>
<META NAME=”Author” CONTENT=””>
<META NAME=”Keywords” CONTENT=””>
<META NAME=”Description” CONTENT=””>
<script language=javascript src=”js/jquery.js”></script>
<script language=javascript src=”js/jquery.blockUI.js”></script>
<script language=javascript>
$(function(){
//檢測引入的jquery.js是否正確。
alert(“jquery 沒有問題!”);
//預設樣式
var a1 = $(“a:eq(0)”);
a1.click(function(){
a1.css(“color”,”green”);
$.blockUI();
});
//自定義內容
var a2 = $(“a:eq(1)”);
a2.click(function(){
$.blockUI({message:`正在處理,請等待…`});
});
//自定義樣式
var a3 = $(“a:eq(2)”);
a3.click(function(){
$.blockUI({ css: {
border:`solid green 2px`,
backgroundColor:`blue`
}
});
});
//藍色背景
var a4 = $(“a:eq(3)”);
a4.click(function(){
$.blockUI({
overlayCSS:{backgroundColor:`blue`},
message:`正在處理,請等待。。。`,
css:{
backgroundColor:`#F0FF00`,
height:40
}
});
});
//停滯2秒
var a5 = $(“a:eq(4)”);
a5.click(function(){
$.blockUI({message:`Processing…`});
setTimeout($.unblockUI,2000);
});
//防止一個表單
var a6 = $(“a:eq(5)”);
a6.click(function(){
$.blockUI({message:$(`#loginForm`)});
});
//通知(Notification)
var a7 = $(“a:eq(6)”);
a7.click(function(){
$.growlUI(`Hi`,`Have a nice day!`);
});
//onBlock callback
a8 = $(“a:eq(7)”);
a8.click(function(){
$.blockUI({
fadeIn: 1000,
timeout: 2000,
onBlock: function() {
alert(`Page is now blocked; fadeIn complete`);
}
});
});
//Theme
var a9 = $(“a:last”);
a9.click(function(){
$.blockUI(
{
theme:true,
title:`<p style=”font-size:25px”>This is your title<p>`,
message:`<p style=”font-size:22px;background-color:green;”>This is your message.</p>`,
timeout:2000
}
);
});
});
</script>
</HEAD>
<BODY>
<a href=”#”>DEFAULT</a>
<a href=”#”>自定義內容</a>
<a href=”#”>自定義樣式</a>
<a href=”#”>藍色背景</a>
<a href=”#”>停滯2秒</a>
<a href=”#”>放置一個表單</a>
<a href=”#”>通知(Notification)</a>
<a href=”#”>onBlock callback</a>
<a href=”#”>Theme</a>
<div id=”login” style=”display:none”>
<form action=”#” id=”loginForm”>
<table>
<thead>
<th>使用者登入</th>
</thead>
<tr>
<td>使用者名稱:</td>
<td><input type=”text” name=”name”></td>
</tr>
<tr>
<td>密碼:</td>
<td><input type=”password” name=”pwd”></td>
</tr>
<tr align=”center”>
<td colspan=”2″>
<input type=”submit” value=”登入”/>
</td>
</tr>
</table>
</form>
</div>
</BODY>
</HTML>
相關文章
- 示例
- pod 示例
- 4.5.1.2.2 示例
- Thrift示例
- InputTextMask示例
- Guice 示例GUI
- crontab 示例
- Go示例集合Go
- GPUImageRawDataInput 使用示例GPUUIAI
- jobs 命令示例
- JMeter使用示例JMeter
- Tcpdump使用示例TCP
- rsync 使用示例
- LAMP搭建示例LAMP
- impdp/expdp 示例
- FastDFS NET示例AST
- javaJedis使用示例Java
- XML - JAXB示例XML
- XML - StAX示例XML
- TryParse用法示例
- java反射示例Java反射
- java DAO示例Java
- kafka java示例KafkaJava
- RMAN配置示例
- ABAP程式示例
- BDC程式示例C程式
- OpenAPI definition(示例)API
- Kendo UI常用示例彙總(I樹列表示例)UI
- Struts官方示例學習-Wildcard_method示例
- Istio示例網站網站
- Flutter動畫及示例Flutter動畫
- HanLP Android 示例HanLPAndroid
- TodoMVC 與 director 示例MVC
- RabbitMQ 程式碼示例MQ
- 看示例學awk
- 決策樹示例
- go操作elasticsearch示例GoElasticsearch
- flink CEP示例