当前位置:嗨网首页>书籍在线阅读

08-用其他语言显示日历

  
选择背景色: 黄橙 洋红 淡粉 水蓝 草绿 白色 选择字体: 宋体 黑体 微软雅黑 楷体 选择字体大小: 恢复默认

8.4.1 用其他语言显示日历

想以其他语言显示日历(如图8-4所示),仅需引入对应该语言的JavaScript语言文件即可。该文件位于jqueryui/development-bundle/ui/i18n目录下面。比如jqueryui/development-bundle/ ui/i18n/jquery.ui.datepicker-fr.js是法语文件:

<script src = jquery.js></script>
<script src = jqueryui/js/jquery-ui-1.8.16.custom.min.js></script>
<script src=jqueryui/development-bundle/ui/i18n/jquery.ui.datepicker-fr.js></script>
<link rel=stylesheet type=text/css
    href=jqueryui/css/smoothness/jquery-ui-1.8.16.custom.css />
<h3>Click to select a date :</h3>
<input id=date />
<script>
$("input#date").datepicker ();
</script>

62.png

图8-4 法语日历