Your ROOT_URL in app.ini is http://git.zky.com/ but you are visiting http://61.178.84.89:8998/luoluo/zhky/blame/commit/8a70e9f08186716aaf463e778be4145786e2f2cd/web/css/phoneNoFormat.htc You should set ROOT_URL correctly, otherwise the web may not work correctly.
zhky/web/css/phoneNoFormat.htc

24 lines
576 B

1 year ago
<public:component>
<public:attach event="onblur" onevent="itemOnBlur()" />
<public:method name="validate">
<script language="javascript">
function validate() {
if (element.value.length==0) return true;
var pat1 = /(^[0-9]{3,4}\-[0-9]{3,8}$)|(^[0-9]{3,8}$)|(^\([0-9]{3,4}\)[0-9]{3,8}$)/;
var pat2 = /(^0{0,1}13[0-9]{9}$)/;
if(!pat1.exec(element.value) && !pat2.exec(element.value)) {
alert("错误的电话号码格式!\n");
element.value="";
element.focus();
return false;
}
return true;
}
function itemOnBlur(){
validate();
}
</script>
</public:component>