Mouse events (top)
As the course goes on, the people who are able to follow down are fewer and less, do not know because there is not too much performance, just rote things, we are not interested ah. Actually on the page
A lot of special effects,
On the forum someone asked JavaScript debug tools, here is recommended two JavaScript debugging tools for everyone, in the future I will also say debugging methods.
IE recommended debugging tool is vs Studio, this download address I do not give, I
In search engine robot searches, the type,text/html for such "text" is the highest (except at this stage Text/xml), and text/javascript this kind of friendly degree is not ideal, If robot also had to judge the DHTML code, the complexity would be
Test Test form Test form Test form Test form text
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
This function is implemented, but feel a bit uncomfortable, you must use the HTML
function Getemail (email)
{
var r = "";
for (i=0;i{
R + + "" + email.charcodeat (i);
}
return R;
}
The effect is as follows:
email address encryption email Address Encryption
Email: results: &
Lt;/body>
Ext All JS is relatively large, a ext-all-debug.js up to 2m more, its compression version (remove JS in line and space), also up to 600 K, this is not too fast in the speed, download js long wait. The Calendar task control, JS up to four or five,
The JavaScript event capture mechanism is analyzed in the example. Share to everyone for your reference, specific as follows:
1. What is event bubbling?
In the sort algorithm, we've learned bubble sort, which means that bubbles are the things that
Label statement, according to the book syntax is:
Label: statement
such as: Begin:for (var i = 0; i
To give a more typical example, after reading the application of label: (No label added)
var num = 0;
for (var i = 0; i }
The main use of JS code
Copy Code code as follows:
function Getselectedtext () {
var SelectedText;
var Textfield=document.getelementbyid (' Inputtextarea ');
if (window.getselection) selectedtext=gettextfieldselection
Today I see blue someone asked this question, I tried to write a, feel the replace+function way is very convenient and concise, the code is as follows:
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh
Enter more than one character, you will find four digits automatically add space
&L T;/html>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
Two values are passed in the box. Good effect
Copy Code code as follows:
University
High school
Junior
a
University High school Junior High School ;/select> a
[Ctrl + A All SELECT
name: Password:
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
Relatively simple, their idle boring write, long time no write code ....
For example: A text box has a text, I want to click the mouse and in the appropriate place to insert text
I do this: first get the value of the text box Textarea.value, and then. textarea.value+ Other text
dnew.cn dnew.cn
Run effect
Delete Product Price Quantity Total Senior weight Loss Green tea $8000 $160000 advanced black tea $8400 $8400 Total: 21 $168400
[Ctrl + A All SELECT Note: If the need to introduce external
Some method
Array1.some (callbackfn[, Thisarg])
Each element in an array array1 calls the callback function CALLBACKFN, and the some method terminates when the callback function returns TRUE or after all the arrays have been traversed. Optional
Before learning bubble algorithm, always do not know the relationship between N and N-1, and other variables, the reason is not to understand its true meaning, today wrote a bubble algorithm of the JS applet, and finally figured out.
Copy
Bubble sort example, bidirectional bubbling sort with a slightly improved visualization of bidirectional bubbling sorting.
The code is very simple, do not know that there are unknown wood bugs.Great God please don't spit in the groove
Bubble Sort
Copy Code code as follows:
1. Create an empty object: var o =new object ();
2. Create Object Direct Quantity:
var cricle={x:0,y:0,radius:2}
var homer={
Name: "Homer Simpson",
Age:34,
Married:true,
Email: "Zzy@163.com"
}
3 Settings and
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