Weak and weak JS beginners

Source: Internet
Author: User

1,

If (event. srcelement. value = "Enter the user name") event. srcelement. value = "";

If (event. srcelement. value = "") event. srcelement. value = "Enter the user name ";

The first judgment in the first line is two equal signs, and the second value is an equal sign. After the front and back are directly reversed by Ctrl + C and CTRL + V, the second line reports an error. Exercise caution when copying and pasting data.

2,

Event. srcelement. Focus ();
Event. srcelement. Select ();

At the beginning, Src was written as SCR, and the following () was not added ()

3,

<Input id = "username" onmouseover = "mover ();" onclick = "mclick ();" onblur = "mblur ();" value = "Enter the user name">

Brackets must be written for all function calls.

4. Do not copy and paste the words in the word into nodepad ++. The quotation marks in the word do not know the format. It is not in half-width English.

5. setTimeout the out is in lower case. Start a row and a rowCodeIs it true that two identical codes are followed? It's really a test of my skills! It was discovered only after being pasted into the drawing!

6. Note that B in Boolean is in uppercase.

7. var A = new array (); A. length, which has no parentheses, A. Pop (), and parentheses. What is the attribute? Do you eat it? Why is there no brackets?

Related Article

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.