Part III: Process Control statementsThe JavaScript code is the writing location:JavaScript code should be written in this pair of tags. or as an external reference each line of JavaScript code is terminated with a semicolon. Output statement1,
JavaScript is a scripting language that requires a host file, and his host file is an HTML file.Not directly related to JavaGenerally written in1.head inside2.body inside3. backGenerally written in back Common dialog boxesAlert ("alert Box") pops
1. JavaScript Match () method descriptionHttp://www.w3school.com.cn/jsref/jsref_match.aspWriting:Stringobject.match (Searchvalue) stringobject.match (regexp)Return value: The array that holds the matching result.2. Match method Regular expression
0 PrefaceThe first is accidentally in the public number (programmer Big Coffee) saw a JS high-force lattice code, and then through the links inside jump to the Jsfuck wiki, like the maze to find the treasure feeling, exclamation JS automatic type
General download is directly open a link on the line.var URL = ' XXXX ';window.open (URL)In fact, this will have some problems:1. The browser prohibits opening a new window, resulting in the inability to downloadSo how to solve it?Such1 href=
One, definition and usageThe IndexOf () method returns the position of the first occurrence of a specified string value in a string.The LastIndexOf () method returns the location of the last occurrence of a specified string value, which is searched
functionfoo () {}foo.prototype.z= 3;varobj =Newfoo (); Obj.y= 2; obj.x= 1; obj.x;//1OBJ.Y;//2Obj.z;//3typeofobj.tostring;//' function '' Z 'inchObj//trueObj.hasownproperty (' z ');//falseFirst, we define a function object by using function foo ().
Objective: Interviewer question: What are the data types of javascript? Because the usual use of time are var xx = xxx; So was asked in amazement, today deliberately understand a bit, there are really some data types. A string (string), a number, a
HTML DOMThrough the HTML DOM, you can access all the elements of a JavaScript HTML document.When a Web page is loaded, the browser creates a Document object model for the page.The HTML DOM model is constructed as a tree of objects. get node
1 /*2 JS Each function is an execution environment3 function Call function will go to the end of the new execution environment and return to the current4 5 Scope chain: External variables can be accessed and modified within the scope6 cannot
1. Create an element text nodeJavascript:Document.createelement (), which receives only one parameter and needs to be manually added to the document tree after creation, for example:var newdiv = document.createelement ("div");if (document.body)
ObjectiveRecently maintained an old system, there is a large number of JS splicing string code, here a total of JS stitching stringJS Native string concatenationThe strings inside JavaScript can be spliced directly with +Return " "+ valsar[0] +"
Prototype definition
Each object has a prototype
The prototype is still an object
Simulating the implementation of object-oriented inheritance
Prototype chain
The prototype of the object is also a prototype
Objects
?1.SubstringThe character used to extract a string between two specified subscriptsSUBSTRING (start,end)Start and end position, zero-based indexThe substring returned by the substring method includes the character at start, but does not include the
Previous wordsIt is generally assumed that JavaScript code executes from the top to the next line at execution time. But this is not exactly true, mainly because of the existence of a declaration of Ascension. This article is the third in-depth
What is immutability ( Immutability )?That is, after a variable has performed an operation, it does not change itself, for example, for a string, any manipulation of the string will change the value of the string itself, but rather on the basis of
Html css front-end basic learning methods and experience sharing, css Experience Sharing
Preface:
On the first day of admission, I would like to share some of my learning methods and experience on front-end html css. I love the front-end, but I
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.