Tacker_Huang 2010-08-16 10:02
浏览 316
已采纳

Dojo的简单测试,怎么回事

使用Dojo1.5测试一下DateTextBox,代码如下:

[code="java"]



DateTextbox <style type="text/css" src = "../dijit/themes/tundra/tundra.css" dojo.require("dijit.form.DateTextBox");


[/code]

IE8中出现的结果如下图。(两个输入框,其中一个带X,点击下面一个,到处都是本应该在日期选择框中出现的字符)
Dojo一定要在服务器下才能运行吗?没有这个要求啊

  • 写回答

1条回答 默认 最新

  • kjah_1 2010-08-16 13:06
    关注

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

    <head>
        <style type="text/css">
            body, html { font-family:helvetica,arial,sans-serif; font-size:90%; }
        </style>
        <script src="../dojo/dojo.js"
        djConfig="parseOnLoad: true">
        </script>
        <script type="text/javascript">
            dojo.require("dijit.form.DateTextBox");
        </script>
        <link rel="stylesheet" type="text/css" href="../dijit/themes/claro/claro.css"
        />
    </head>
    
    <body class=" claro ">
        <input type="text" name="date1" id="date1" value="2005-12-30" dojoType="dijit.form.DateTextBox"
        required="true" />
        <label for="date1">
            Drop down Date box. Click inside to display the calendar.
        </label>
        <!-- NOTE: the following script tag is not intended for usage in real
        world!! it is part of the CodeGlass and you should just remove it when
        you use the code -->
        <script type="text/javascript">
            dojo.addOnLoad(function() {
                if (document.pub) {
                    document.pub();
                }
            });
        </script>
    </body>
    

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 有赏,i卡绘世画不出
  • ¥15 如何用stata画出文献中常见的安慰剂检验图
  • ¥15 c语言链表结构体数据插入
  • ¥40 使用MATLAB解答线性代数问题
  • ¥15 COCOS的问题COCOS的问题
  • ¥15 FPGA-SRIO初始化失败
  • ¥15 MapReduce实现倒排索引失败
  • ¥15 ZABBIX6.0L连接数据库报错,如何解决?(操作系统-centos)
  • ¥15 找一位技术过硬的游戏pj程序员
  • ¥15 matlab生成电测深三层曲线模型代码