<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>測試EasyUI-messager</title>
<!-- 配置 -->
<!-- 1 jQuery的js包 -->
<script type="text/javascript" src="jquery-easyui-1.4.4/jquery.min.js"></script>
<!-- 2 css資源 -->
<link rel="stylesheet" type="text/css" href="jquery-easyui-1.4.4/themes/metro/easyui.css">
<!-- 3 圖標資源 -->
<link rel="stylesheet" type="text/css" href="jquery-easyui-1.4.4/themes/icon.css">
<!-- 4 EasyUI的js包 -->
<script type="text/javascript" src="jquery-easyui-1.4.4/jquery.easyui.min.js"></script>
<!-- 5 本地語言 -->
<script type="text/javascript" src="jquery-easyui-1.4.4/locale/easyui-lang-zh_CN.js"></script>
</head>
<body>
<script type="text/javascript">
$(
function()
{
<!-- 單擊按鈕觸發事件 -->
$("#bt1").click(
function()
{
$.messager.prompt("輸入框","輸入姓名:",
function(val)
{
if(val)
{
alert("你的姓名是"+val);
}
}
) ;
}
) ;
}
);
</script>
<button id="bt1">按鈕</button>
</body>
</html>
<body>
<script type="text/javascript">
$(
function()
{
// 單擊按鈕觸發事件
$("#bt1").click(
function()
{
$.messager.progress(
{
title:"進度條",
msg:"正在加載。。。" ,
text:"請稍後。。。" ,
interval:1000
}
) ;
}
) ;
}
);
</script>
<button id="bt1">按鈕</button>
</body>
<body>
<script type="text/javascript">
$(
function()
{
// 單擊按鈕觸發事件
$("#bt1").click(
function()
{
$.messager.show(
{
title:"消息" ,
msg:"消息內容",
showType:"fade",
showSpeed:1000,
width:400,
height:200,
timeout:6000 //若是定義爲0,消息窗體將不會自動關閉,
//除非用戶關閉他。若是定義成非0的樹,
//消息窗體將在超時後自動關閉。默認:4秒。
}
);
}
) ;
}
);
</script>
<button id="bt1">按鈕</button>
</body>