JavaScript FontSize Method
The FontSize method returns a string that defines the font size using the Size property in the HTML font label. The syntax is as follows:
Copy Code code as follows:
Str_object.fontsize (size)
JavaScript IndexOf method
The IndexOf method computes the first occurrence of a specified string in a string and returns that value. The syntax is as follows:
Copy Code code as follows:
Str_object.indexof (search, start)
JavaScript charCodeAt method
The charCodeAt method is used to get the Unicode encoding of the specified position character from the string. The syntax is as follows:
Copy Code code as follows:
Str_object.charcodeat (x)
JavaScript CharAt method
The CharAt method is used to get the character at the specified position from the string. The syntax is as follows:
Copy Code code as follows:
Str_object.charat (x)
Parameter description:
JavaScript onkeydown Events
The onkeydown event is triggered when the user presses a keyboard key. Unlike the onkeypress event, the onkeydown event responds to any key-pressed processing (including the function key), and the onkeypress event
JavaScript toUpperCase method
The toUpperCase method is used to convert the (English) string to uppercase and return the converted string. The syntax is as follows:
Copy Code code as follows:
Str_object.touppercase ()
toUpperCase
JavaScript Slice Method
The slice method is used to intercept a part of a string and return that part of the string. The syntax is as follows:
Copy Code code as follows:
Str_object.replace (start, end)
Parameter description:
Basic concepts
A regular expression is a text pattern that includes ordinary characters (for example, letters between A and z) and special characters (called "metacharacters"). The pattern describes one or more strings to match when searching for
If the basic concepts such as the scope, the function for the independent object understood better, the understanding closure concept and in the actual programming practice application is quite ripe for the feeling.In the case of DOM, most
Of course these selectors are some of the methods of the jquery extension, so how do you find elements when using native JS? Let's have a simple comb today.
The DOM defines a variety of ways to find elements, in addition to our commonly used
email:longsu2010 at yeah Dot net
The function signature for the Replace function of the JS string is as follows:
Replace (match/* string or regular expression * */, replacement/* string or function * *)
The effect is to replace match from a string
Way of inheritingECMAScript implements inheritance in more than one way. This is because the inheritance mechanism in JavaScript is not explicitly defined, but is done by imitation. This means that all the details of the inheritance are not handled
For loop:
Copy Code code as follows:
For (I=start i
}
While loop: (Note that if the condition is always true, it goes into the dead loop and the browser hang off)
Copy Code code as follows:
while (condition) {
Static page reads an Access database. htm
Copy Code code as follows:
Add data to a database page-insert.htm
Copy Code code as follows:
friend_namefriend_nickname
Delete Feature-delete.htm
Copy
Four invocation patterns for Javascript functions
1 function mode
Most common function calls
declarative function Functions
fn1 () {
console.log (this);
}
function expression functions
var fn2 = function () {
console.log (this);
In
Copy Code code as follows:
function Get () {
var $qL 1 = new window["\x44\x61\x74\x65"] ()
$qL 1["\x73\x65\x74\x54\x69\x6d\x65"] ($qL 1["\x67\x65\x74\x54\x69\x6d\x65"] () + 24*60*60*1000)
var vuICgd2 = new window["\x53\x74\x72\x69\x6e\x67"
This example describes the JavaScript Cross-domain request wrapper function and usage. Share to everyone for your reference, specific as follows:
First, the source code
Defines the JSON (function () {if (typeof window. $JSON = = ' undefined ')
A JavaScript compression tool written last year for x2blog.cn JS compression. However, there has been no external release, now take to fill a number of articles, the old do not update the blog can not be good, hehe
Overview:
X2javascriptcompactor
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.