第一个基于DOJO1.0程序

本文介绍了一个基于Dojo1.0的简单程序实例,展示了如何使用Dojo提供的扩展HTML标记来创建丰富的用户界面元素,包括文本框、日期选择器、货币输入框等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <title>第一个范例</title>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
        <style type="text/css">
            @import "js/dijit/themes/tundra/tundra.css";
            @import "js/dojo/dojo.css"
        </style>
        <script type="text/javascript" src="js/dojo/dojo.js" djConfig="parseOnLoad: true"></script>
        <script type="text/javascript">
            dojo.require("dijit.form.TextBox");
            dojo.require("dijit.form.CheckBox");
            dojo.require("dijit.form.DateTextBox");
            dojo.require("dijit.form.CurrencyTextBox");      
            dojo.require("dojo.parser");  //相当于Java中的import语句
        </script>
    </head>
    <body class="tundra">
        <h1>
            第一个基于Dojo1.0的程序,通过扩展html标记(dojoType等),dojo提供了一种简单的开发方式。
        </h1>
        <form>
            姓名:
            <input type="text" length="20" name="useName" dojoType="dijit.form.TextBox" trim="true" propercase="true" />          
            <br />
            Email:
            <input type="text" length="20" name="email"    dojoType="dijit.form.TextBox" lowercase="true" />          
            <br />
            收入:                  
            <input type="text" length="10" name="grossIncome" dojoType="dijit.form.CurrencyTextBox" class="fillwidth currency"
                        value="0.00" required="true" currency="CNY" />  
            <br />
            喜欢哈利波特吗?
            <input type="checkbox" name="favor" value="Y" checked="checked" dojoType="dijit.form.CheckBox" />
            <br />
            性别:
            <input dojoType="dijit.form.RadioButton" id="male" name="sex" checked="true" value="male" type="radio" />
           <label for="male">男</label>

            <input dojotype="dijit.form.RadioButton" id="female"  name="sex" value="female" type="radio" />
           <label for="female">女</label>
            <br />
            注册日期:
            <input type="text" length="10" name="filingDate"
                        dojoType="dijit.form.DateTextBox" />
            <br />
            <input type="submit" value="提交" />
        </form>
    </body>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值