⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 checkbox.js

📁 用最近的dojo1.2.1制作前端的ajax购书网站
💻 JS
字号:
/*	Copyright (c) 2004-2008, The Dojo Foundation All Rights Reserved.	Available via Academic Free License >= 2.1 OR the modified BSD license.	see: http://dojotoolkit.org/license for details*/if(!dojo._hasResource["dijit.form.CheckBox"]){dojo._hasResource["dijit.form.CheckBox"]=true;dojo.provide("dijit.form.CheckBox");dojo.require("dijit.form.Button");dojo.declare("dijit.form.CheckBox",dijit.form.ToggleButton,{templateString:"<div class=\"dijitReset dijitInline\" waiRole=\"presentation\"\n\t><input\n\t \ttype=\"${type}\" name=\"${name}\"\n\t\tclass=\"dijitReset dijitCheckBoxInput\"\n\t\tdojoAttachPoint=\"focusNode\"\n\t \tdojoAttachEvent=\"onmouseover:_onMouse,onmouseout:_onMouse,onclick:_onClick\"\n/></div>\n",baseClass:"dijitCheckBox",type:"checkbox",value:"on",_setValueAttr:function(_1){if(typeof _1=="string"){this.value=_1;dojo.attr(this.focusNode,"value",_1);_1=true;}if(this._created){this.attr("checked",_1);}},_getValueAttr:function(){return (this.checked?this.value:false);},postMixInProperties:function(){if(this.value==""){this.value="on";}this.inherited(arguments);},_fillContent:function(_2){},reset:function(){this._hasBeenBlurred=false;this.attr("checked",this.params.checked||false);this.value=this.params.value||"on";dojo.attr(this.focusNode,"value",this.value);},_onFocus:function(){if(this.id){dojo.query("label[for='"+this.id+"']").addClass("dijitFocusedLabel");}},_onBlur:function(){if(this.id){dojo.query("label[for='"+this.id+"']").removeClass("dijitFocusedLabel");}}});dojo.declare("dijit.form.RadioButton",dijit.form.CheckBox,{type:"radio",baseClass:"dijitRadio",_setCheckedAttr:function(_3){this.inherited(arguments);if(!this._created){return;}if(_3){var _4=this;dojo.query("INPUT[type=radio][name="+this.name+"]",this.focusNode.form||dojo.doc).forEach(function(_5){if(_5!=_4.focusNode&&_5.form==_4.focusNode.form){var _6=dijit.getEnclosingWidget(_5);if(_6&&_6.checked){_6.attr("checked",false);}}});}},_clicked:function(e){if(!this.checked){this.attr("checked",true);}}});}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -