flymis/WebRoot/dojojs/src/widget/InternetTextbox.js

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/*
	Copyright (c) 2004-2006, The Dojo Foundation
	All Rights Reserved.

	Licensed under the Academic Free License version 2.1 or above OR the
	modified BSD license. For more information on Dojo licensing, see:

		http://dojotoolkit.org/community/licensing.shtml
*/

dojo.provide("dojo.widget.InternetTextbox");

dojo.require("dojo.widget.ValidationTextbox");
dojo.require("dojo.validate.web");

dojo.widget.defineWidget(
	"dojo.widget.IpAddressTextbox",
	dojo.widget.ValidationTextbox,
	{
		// summary:  A Textbox which tests for a valid IP address
		// description:  Can specify formats for ipv4 or ipv6 as attributes in the markup.
		//
		// allowDottedDecimal  true or false, default is true.
		// allowDottedHex      true or false, default is true.
		// allowDottedOctal    true or false, default is true.
		// allowDecimal        true or false, default is true.
		// allowHex            true or false, default is true.
		// allowIPv6           true or false, default is true.
		// allowHybrid         true or false, default is true.

		mixInProperties: function(/*Object*/localProperties){
			// summary: see dojo.widget.Widget

			// First initialize properties in super-class.
			dojo.widget.IpAddressTextbox.superclass.mixInProperties.apply(this, arguments);

			// Get properties from markup attributes, and assign to flags object.
			if(localProperties.allowdotteddecimal){ 
				this.flags.allowDottedDecimal = (localProperties.allowdotteddecimal == "true");
			}
			if(localProperties.allowdottedhex){ 
				this.flags.allowDottedHex = (localProperties.allowdottedhex == "true");
			}
			if(localProperties.allowdottedoctal){ 
				this.flags.allowDottedOctal = (localProperties.allowdottedoctal == "true");
			}
			if(localProperties.allowdecimal){ 
				this.flags.allowDecimal = (localProperties.allowdecimal == "true");
			}
			if(localProperties.allowhex){ 
				this.flags.allowHex = (localProperties.allowhex == "true");
			}
			if(localProperties.allowipv6){ 
				this.flags.allowIPv6 = (localProperties.allowipv6 == "true");
			}
			if(localProperties.allowhybrid){ 
				this.flags.allowHybrid = (localProperties.allowhybrid == "true");
			}
		},

后面还有 108 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。