This article mainly introduces the differences between javascriptinnerHTML, outerHTML, innerText, and outerText. This article describes their functions, usage examples, and differences. For more information, see
1. Function Description:InnerHTML
Writing code is very simple for us, but building a layout design is just like logging on to facebook. It is definitely what you want, and you don't need images, because I have been reposted to many places but no one has told me where I came from, I
Code of small blocks that can be dragged
script function pBlock_event_mousedown (e) {var e, obj, temp; obj = document. getElementById ("pBlock"); e = window. event? Window. event: e; obj. startX = e. clientX-obj.offsetLeft; obj. startY = e.
When I open the page, everything works normally under FF, but when I use IE6 for testing, the JS cannot be executed, and the prompt "not implemented" is displayed. No matter how it works, it cannot be implemented. No error message is displayed in
Just now, a friend told me that his blog has too many links, so he put all the links in a DIV and added a scroll bar, but he didn't want to see them every time, I can see the previous links, so I asked if I could do anything. I thought of a method.
$. For details about how to transmit json data under ajax, refer. In this way, json data can be transmitted to the front-end.
The Code is as follows:
No title page
Multiple methods to regularly refresh page refreshing code:
1. script setTimeout ("location. href = 'url'", 2000) script
Note: The url is the URL of the page to be refreshed.
2000 is the waiting time = 2 seconds,
2,
Note:
N is the number of
Sometimes we only need to print part of the content, because there are a lot of advertisements and some related content on the current page, all use the following method, you can print normally use window. print (); print the entire page directly,
Javascript restricts the input and paste of IE and Firefox 2.x, FireFox 3.x, and passes the test
The Code is as follows:
Window ["MzBrowser"] = {};(Function (){If (MzBrowser. platform) return;Var ua = window. navigator. userAgent;MzBrowser.
Using xml as a storage container without database, the speed and efficiency are higher. 1. Create a test XML file: select. xml
The Code is as follows:
ShaanxiXi'an Baoji Ankang JiangsuNanjing Xuzhou Shanghai
2. Create an HTML page:
Js has some wmp attributes and methods to help you control the playing details of music. WMP-common attributes and methods in Web pages
// Basic attributes
Wmp. URL: String; // specifies the media location, local address or network address
Wmp.
At noon yesterday, a modal window was required for the project. I remembered that the project manager of the previous company had done a very good modal window. So far, I have no idea about the implementation principle, and I have no time to analyze
It is a good thing for beginners to understand. The following is a summary of how to learn about js today:
When will the script be executed:
1. Execute the script when opening the page
When the browser opens an HTML document, it will
I recently started to be interested in ExtJS. Today I am free. It took some time to write an Ext-based example. To tell the truth, I am still not very familiar with Ext technology, so I think it is strange to write code. What's wrong with it.
The
Some css operation methods implemented by js are set to facilitate the use of JavaScript to control css friends // obtain the true and final CSS style attribute values.
Function getStyle (elem, name ){
If (elem. style [name]) {
Return elem. style
The javascript program architecture of this website starts from the following basic points 1. When a webpage is loaded, the js file reference in the page code (as follows) will generate an http request to the server, because it is in the body. files
JQuery anchor jump to the scroll bar to smoothly scroll the code in one sentence. For more information, see. JQuery anchor jump to the scroll bar to smoothly scroll one sentence code
$("html,body").animate({scrollTop: $("#box").offset().top}, 1000);
This article mainly introduces information about the three-level linkage drop-down menu (java version) of AJAX in provinces, cities, and cities, for more information about this applet, see the following:
The Code is as follows:
The code in the
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