Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to implement custom verification of SPRY in DreamWeaver CS3

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article will explain in detail how to achieve custom verification of SPRY in DreamWeaver CS3. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

The code is as follows:

You need to provide a value.

The data is invalid.

This is the generation of code that you manually drag a SPRY text box to verify.

This is followed by a piece of code declaring SPRY

The code is as follows:

The final validation:EXT, which I added manually, means that the validation of the SPRY is achieved by calling the function EXT. EXT returns True, which indicates that the verification is passed, and EXT returns False, which indicates that the verification is not passed. (EXT is a function name and can be defined by yourself, but this method does not seem to be able to pass parameters.)

The code is as follows:

Var EXT = function () {

Var objReg=/ (13) (\ d {9}) /

T=form1.text1.value

Return objReg.test (t)

}

The above code indicates that when verifying the content of text1, it conforms to the mobile phone number of China.

We can achieve the effect of custom validation by modifying the EXT function. For example: verify that the contents of the password box and the repeat password box are the same.

The code is as follows:

Var EXT = function () {

Return (form1.Pass.value==form1.RePass.value)

}

This is the end of this article on "how to achieve custom verification of SPRY in DreamWeaver CS3". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report