Original address: Http://hi.baidu.com/kinghmx/item/395dbac3261292dcef183b52Recently wrote a page, in out of IE6 all browsers are normal (ie7,8,9, Firefox, Chrome), IE6 under the prompt "Unable to set the selected property." Unspecified error ".It
There are times when you want to use the client database on a Web page, but in order to be compatible with the version of the browser does not support XML technology, so here is a number of JS DML functions I want interested friends to discuss
Read JavaScript for a few days, such as object-oriented and basic knowledge of JavaScript, because I write PHP, but also written in Java, so I want to write JavaScript code can also use the object-oriented thinking,Toss the whole day of JS
InstanceSet the value of the input field: $ ("button"). Click (function () {$ (": Text"). Val ("Hello World");}); Try it yourself. Definition and usageThe Val () method returns or sets the value of the selected element. The value of the element is
A, $.get (Url,[data],[callback])Implementing the Get MethodDescriptionURL (String) to send the requested URL address.Data (MAP) (optional parameter) to be sent to the server, expressed as a Key/value key-value pair, is appended to the request URL as
Get select:Gets the text selected by the Select:$ ("#ddlregtype"). Find ("option:selected"). Text ();Gets the value selected by select:$ ("#ddlregtype"). Val ();Gets the index selected by the select:$ ("#ddlregtype"). Get (0). SelectedIndex;Set
jquery Gets the text and value of select selectionGet select:Gets the text selected by the Select:$ ("#ddlregtype"). Find ("option:selected"). Text ();Gets the value selected by select:$ ("#ddlregtype"). Val ();Gets the index selected by the select:$
What is promise? The core idea of promise is to represent a result of an asynchronous operation, and promise has three states (pending initial state, fulfilled success state, rejected failure state). We can understand that the use of promise can
1. Define the width and height of the pop-up box with the percentage of screen available and highvar truewidth = $ (Top.window). Width () * 0.9;var trueheight = $ (Top.window). Height () * 0.9;2. Verify the number when the cursor is awayJsfunction
$.each () is a traversal of arrays, JSON, and DOM structures1. Traversing a one-dimensional arrayvar arr1=[' aa ', ' BB ', ' cc ', ' DD ']; $.each (Arr1,function (i,val) {//two parameters, the first parameter represents the subscript of the
In jquery The Ajax submission form has a post and get way, and we can use Ajax to serialize the form $ (Form ID) serialize () directly using the Get mode (); Here's the two ways to submit form data. $get Way to submit a form get () method via remote
This article is an example of jquery implementation of the order submission page to send SMS function front-end processing methods. Share to everyone for your reference, specific as follows:
1. The effect is as shown in the picture:
2.html
To get the calculation style of HTML elements there are always many compatibility issues, there are some differences in browsers, Firefox, WebKit (Chrome,safari) to support the standard of the Consortium method: getComputedStyle (), and ie6/7/ 8
This is what you do before you make a query on a Web page.
Form get keyword –> incoming back-end SQL statement processing –> data back to front display
Today suddenly to the ctrl+f of the browser how to achieve this function, the data once on the
The hash property is a readable, writable string that is the anchor part of the URL (the part starting with the # number).
Grammar
Location.hash
In our project, there is a large number of Ajax query form + Results list page, since the query
1. Where is the JavaScript script?
1. When some functions need to be invoked before they are executed or some events need to be triggered to execute, we can place the script in the Head section of the HTML to ensure that the script is loaded before
Jqgrid Documents: Http://www.trirand.com/jqgridwiki/doku.php?id=wiki:jqgriddocs
Jqgrid demo:http://trirand.com/blog/jqgrid/jqgrid.html
Jqgrid Foundation, I do not introduce here, do not know can go to visit the blog Park or Google, the best to see
Submit a Form $get way
The Get () method loads information through a remote HTTP GET request
Format
$ (selector). Get (Url,data,success (RESPONSE,STATUS,XHR), DataType)
Request test.php Web page, transfer 2 parameters, ignore return value:
For the element focus event, we can use the focus function of jquery (), Blur ().
Focus (): used in the same way as onfocus in JavaScript, when it is focused.
Such as:
The code is as follows
Copy Code
$ ("P"). focus ();
Don't waste the effect of data types
When you want to store digital data, you might want to specify a numeric data type. Before you do so, please consider the purpose of the data first. For example, you wouldn't use a block number or a zip code for
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.