Three months-see the rookie's Daily growth (JS-Regular form &&phpmail transceiver)

Source: Internet
Author: User

Today wrote a JS verification. Is the validation of legitimacy involving a single data.

Is that the core is the form of the expression. Other things are details, but the details are very important.

Today made a special 2B error, in the function functions of JS, the time of the alert character. Use the double-cited. Cause the program to run up error.

Bothered myself all morning. Only to find that this little detail was not noticed. Word. Or the strength of their own incompetence. to improve.

The following is a common form of the table and JS Basic grammar rules.
The first is the expression, according to the 2/8 theorem, 20% of the expression is used in 80%, the other do not tube.

A little bit more.
The most important matches, "/d" for numbers, "/w" for matching letters, numbers containing Chinese characters, "/S" matches all whitespace characters. “/.” Matches whatever character except for whitespace.

Then all uppercase, meaning the opposite meaning.

Then there are three quantifier "*", "+", "?" that represent the number of matches. ", represented separately. 0 times. More than once. 0 times once. Then two often used modifiers are "^" pre-characters. The "$" post character. Another important escape symbol, "\", is to turn all these special-meaning matches into the meaning that they can match. Basically grasp the above, you do most of the regular use of the regular form.
/-?

^[0-9]+\.?

[0-9]?$/This is a regular expression that matches a positive negative number.] And there is only one decimal point or no decimal point.

There can be no other strings or letters.

This makes it possible to insert illegal data into the database when Col is the numeric type.


JS comes with the regular test (str) function. is to verify that STR matches the regular rule that you define, and that if the match returns True, it returns false. Use this to be able to do the front-end of the complex JS verification.


Then is the JS details of the grammatical rules, today ate a big loss of place.
<input type= "button" onclick= "Alert (" 1 ")" >----------------Error
<input type= "button" onclick= "alert (' 1 ')" >------------------correct
The assumption is that in the function functions that JS loads, the HTML will not display properly because of the syntax errors that are included in the middle.

And the program is interrupted. Pay attention to this detail.


PHP's mail function, send mail. The university course has been established. But only the SMTP protocol was sent by mail. The use of Phpmailer. But did not give POP3 to receive mail. This part will be realized today. Add a little bit more PHP mail to send to receive. Fully understand the use of SMTP and POP3 protocols in practice.










A little day, live broadcast. Rookie of the Road of growth!

。。 Three months to witness how the rookie become a great God.

2014/09/25 0:33 Beijing

Three months-see the rookie's Daily growth (JS-Regular form &amp;&amp;phpmail transceiver)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.