<!DOCTYPE html> <!--[if lt IE 9]> <script type="text/javascript" src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <html> <head> <meta charset="utf-8"> <title>jQuery UI 測試</title> <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/themes/hot-sneaks/jquery-ui.css" rel="stylesheet"> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"></script> <script type="text/javascript" src="../jquery/jquery.ui.datepicker-ar.js"></script> <script type="text/javascript" src="../jquery/jquery.ui.datepicker-es.js"></script> <script type="text/javascript" src="../jquery/jquery.ui.datepicker-ja.js"></script> <script type="text/javascript" src="../jquery/jquery.ui.datepicker-de.js"></script> <script type="text/javascript" src="../jquery/jquery.ui.datepicker-ko.js"></script> <script type="text/javascript" src="../jquery/jquery.ui.datepicker-fr.js"></script> <script type="text/javascript" src="../jquery/jquery.ui.datepicker-ru.js"></script> <script type="text/javascript" src="../jquery/jquery.ui.datepicker-zh-TW.js"></script> <script type="text/javascript" src="../jquery/jquery.ui.datepicker-zh-CN.js"></script> <style> article,aside,figure,figcaption,footer,header,hgroup,menu,nav,section {display:block;} body {font: 62.5% "Trebuchet MS", sans-serif; margin: 50px;} </style> </head> <body> <img id="en" src="UK.png" title="United Kindom"> <img id="ar" src="SaudiArabia.png" title="Saudi Arabia"> <img id="es" src="Spain.png" title="Spain"> <img id="ja" src="Japan.png" title="Japan"> <img id="de" src="Germany.png" title="Germany"> <img id="ko" src="SouthKorea.png" title="South Korea"> <img id="fr" src="France.png" title="France"> <img id="ru" src="Russian.png" title="Russian"> <img id="zh-TW" src="Taiwan.png" title="Taiwan"> <img id="zh-CN" src="China.png" title="China"><br> <div id="msgbox1" title="訊息"></div> <input id="datepicker1" type="text" /><br> Flags are from <a href="http://www.icondrawer.com" target="_blank">www.icondrawer.com</a> <script language="JavaScript"> $(document).ready(function(){ var locale=$.datepicker.regional[""]; $("#en").click(function() { locale=$.datepicker.regional[""]; show_msg("英文"); }); $("#ar").click(function() { locale=$.datepicker.regional["ar"]; show_msg("阿拉伯文"); }); $("#es").click(function() { locale=$.datepicker.regional["es"]; show_msg("西班牙文"); }); $("#ja").click(function() { locale=$.datepicker.regional["ja"]; show_msg("日文"); }); $("#ko").click(function() { locale=$.datepicker.regional["ko"]; show_msg("韓文"); }); $("#fr").click(function() { locale=$.datepicker.regional["fr"]; show_msg("法文"); }); $("#de").click(function() { locale=$.datepicker.regional["de"]; show_msg("德文"); }); $("#ru").click(function() { locale=$.datepicker.regional["ru"]; show_msg("俄文"); }); $("#zh-TW").click(function() { locale=$.datepicker.regional["zh-TW"]; show_msg("繁體中文"); }); $("#zh-CN").click(function() { locale=$.datepicker.regional["zh-CN"]; show_msg("簡體中文"); }); $("#datepicker1").datepicker({beforeShow: set_locale}); function set_locale() {return locale;} function show_msg(language) { $("#msgbox1").html("已將語系設為 : " + language); $("#msgbox1").dialog("open"); } $("#msgbox1").dialog({autoOpen: false, buttons: {"確定": function() {$(this).dialog("close");}} }); }); </script> </body> </html>