In today's project, we encountered a garbled problem. We uploaded the URL from JS to the server. The URL contains Chinese parameters. All the Chinese parameters read on the server are "?". I checked the JS coding materials on the Internet to solve
Js gets the browser height and width value, considering multiple browsers as much as possible.
IE:
Document. body. clientWidth ==> BODY object width
Document. body. clientHeight ==> BODY object height
Document.doc umentElement. clientWidth ==>
In javascript form making, you sometimes need to obtain the selected values of the select statement, and then perform some write control operations. For example, if you want to pass the parameters in the drop-down box to the background when using
JS gets the file name and parameters in the URL. This version contains detailed annotations.
The Code is as follows:
// Get the page file nameFunction GetPageName (){Var url = window. location. href; // obtain the complete URLVar tmp = new
When determining the function type, we usually use the typeof method. In general, it will get the expected effect. However, we are not familiar with some details. After analyzing these details, John Resig provides us with a perfect solution. This
Looking at other people's code on CSDN, I feel more refined. If you need it, you can check it out.
The Code is as follows:
// Date typeFunction myDate (time ){Var d = new Date (time );This. y = d. getFullYear ();This. m = d. getMonth ();This. d
JsTree is a javascript-based cross-browser tree control that is powerful and free of charge. 1. Support loading Tree nodes based on HTML definition, Json, and XML
2. Supports drag-and-drop, dynamic addition, deletion, and rename of Tree nodes
3.
Original JS partition effect, object-oriented, easy to use. I have also seen some column splitting effects on the Internet, and there is also a jquery plug-in jquery. splitter. js, But they basically did not solve a problem: if there is an iframe on
Traverse the values of all text boxes and determine whether the value is a number:
We all know that the type of input in the text box is text. We only need to traverse all input, determine whether the type is text, and then determine whether the
When modifying data, we sometimes want to directly modify the data in the table for convenience. To implement the Editable table function, we need to solve the following problems:
1. Identify the columns of the data to be modified in the table (how
In practical applications, you should avoid using innerHTML directly. for a large number of character join operations, you should consider the first operation before outputting.
The Code is as follows:
AppendChild, innerHTML, join
JQuery floating navigation bar implementation code, which can be modified as needed.
The Code is as follows:
Transitional. dtd ">
JQuery floating navigation bar
The image display effect, the mouse changes to a large image, and supports FF as beautiful as FLASH
5 document. onselectstart = new Function ("return false"); O = new Array (); box = 0; img = 0; txt = 0; tit = 0; W = 0; H = 0; nI = 0; sel =
Javascript reads the implementation code of the EXCEL file, and you can test it on your own. Javascript reads the implementation code of the EXCEL file, and you can test it on your own.
The home page provides an example with Chinese instructions.
It is a good habit for constructors to start with an uppercase letter, which serves as a reminder so that you do not forget the new operator before calling it.
JavaScript function call Rule 1
(1) Global function call:
Function makeArray (arg1, arg2
It uses the idea of recursive calling!
The Code is as follows:
Function settime (){Var myyear, mymonth, myweek, myday, mytime, mymin, myhour, mysec;Var mydate = new Date ();Myyear = mydate. getFullYear ();Mymonth = mydate. getMonth ();Myday =
Speaking of the event in the browser, I believe many people have a headache. Most of the ie event can be obtained because the ie event is global and firefox event is local, it is not easy to use. At this time, we need to assemble common event
As we all know, JavaScript is a scripting language, which is extremely flexible. Sometimes "flexible" means that people who are familiar with c-language have to admire the power of scripts. For example, the arguments parameter. When I first saw this
The JQUERY browser judges the implementation function. It is not recommended to judge whether the browser is used. If jquery is used, add a large class library because of this small function. It is recommended that you learn about jquery and learn
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