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 C#读写EXCEL文件,不同编译
  • ¥15 如何提取csv文件中需要的列,将其整合为一篇完整文档,并进行jieba分词(语言-python)
  • ¥15 MapReduce结果输出到HBase,一直连接不上MySQL
  • ¥15 扩散模型sd.webui使用时报错“Nonetype”
  • ¥15 stm32流水灯+呼吸灯+外部中断按键
  • ¥15 将二维数组,按照假设的规定,如0/1/0 == "4",把对应列位置写成一个字符并打印输出该字符
  • ¥15 NX MCD仿真与博途通讯不了啥情况
  • ¥15 win11家庭中文版安装docker遇到Hyper-V启用失败解决办法整理
  • ¥15 gradio的web端页面格式不对的问题
  • ¥15 求大家看看Nonce如何配置