internettextbox.js

来自「OA系统实现以下功能: a、个人办公,我的办公桌 b、公文管理 c、工作流」· JavaScript 代码 · 共 79 行

JS
79
字号
/*	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, {mixInProperties:function (localProperties) {	dojo.widget.IpAddressTextbox.superclass.mixInProperties.apply(this, arguments);	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");	}}, isValid:function () {	return dojo.validate.isIpAddress(this.textbox.value, this.flags);}});dojo.widget.defineWidget("dojo.widget.UrlTextbox", dojo.widget.IpAddressTextbox, {mixInProperties:function (localProperties) {	dojo.widget.UrlTextbox.superclass.mixInProperties.apply(this, arguments);	if (localProperties.scheme) {		this.flags.scheme = (localProperties.scheme == "true");	}	if (localProperties.allowip) {		this.flags.allowIP = (localProperties.allowip == "true");	}	if (localProperties.allowlocal) {		this.flags.allowLocal = (localProperties.allowlocal == "true");	}	if (localProperties.allowcc) {		this.flags.allowCC = (localProperties.allowcc == "true");	}	if (localProperties.allowgeneric) {		this.flags.allowGeneric = (localProperties.allowgeneric == "true");	}}, isValid:function () {	return dojo.validate.isUrl(this.textbox.value, this.flags);}});dojo.widget.defineWidget("dojo.widget.EmailTextbox", dojo.widget.UrlTextbox, {mixInProperties:function (localProperties) {	dojo.widget.EmailTextbox.superclass.mixInProperties.apply(this, arguments);	if (localProperties.allowcruft) {		this.flags.allowCruft = (localProperties.allowcruft == "true");	}}, isValid:function () {	return dojo.validate.isEmailAddress(this.textbox.value, this.flags);}});dojo.widget.defineWidget("dojo.widget.EmailListTextbox", dojo.widget.EmailTextbox, {mixInProperties:function (localProperties) {	dojo.widget.EmailListTextbox.superclass.mixInProperties.apply(this, arguments);	if (localProperties.listseparator) {		this.flags.listSeparator = localProperties.listseparator;	}}, isValid:function () {	return dojo.validate.isEmailAddressList(this.textbox.value, this.flags);}});

⌨️ 快捷键说明

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