This time in the project before and after the data interaction using the JSON, after this period of use, probably understand, a simple summary of JSON.
Json:javascript Object Notation (JavaScript object notation).
JSON is the syntax for storing and
37.5*5.5=206.08 (JS figure out is such a result, I rounded to take two decimal places)I first suspect is rounding the problem, directly with JS calculate a result is: 206.08499999999998How can this, two numbers only one decimal number multiplied,
Foreword : Recently in doing Soso map related development, encounter related drawing circle knowledge, hereby simply record down.1. Add the Soso Map API reference to the page, referencing the script :
Copy Code code as follows:
;
This example describes how jquery uses the Hide method to hide the specified elements on a page. Share to everyone for your reference. Specifically as follows:
The following JS code hides the contents of all tags in the Web page
this
1. Event TargetThe event object is now stored in the event handler. The Event.target property holds the target element in which the event occurred. This attribute is specified in the DOM API, but is not implemented by all browsers. jquery makes the
This example summarizes the common control methods for jquery operations forms. Share to everyone for your reference. Specifically as follows:
The following JS code lists commonly used methods for jquery operations forms (including
In the project, you need the Fusioncharts chart to display the double Y axis, as if fcf_msline.swf can't, only one y axis, multiple lines,
Looked for, with MSCOMBIDY2D.SWF can be implemented, the production diagram is as follows:
The data for
Fine read this article, enough for you to optimize a half-day, about the JS optimization methods are mostly out of these three methods.
(Total page size is 155.k, and JS takes up 100.3K)
It's time to optimize the next JS.
About JS optimization
Peng Old wet Recent monthly report mentioned valueof method, the interest came to the next ECMA5 in the ValueOf method of introduction, as follows:
15.2.4.4 Object.prototype.valueOf ()
When the valueof is called, the following steps are taken:
1.
Recently need to encounter this problem click on the button to copy the link function decisive Niang google. Finally found the solution zeroclipboard an open source to js+flash implementation of the cut board operation
But after searching for a
In the server-side file upload process, if the use of the Web server to upload the short end of the file, will cause the page to refresh once, so the user experience is not very friendly. Ajaxfileupload.js is a jquery asynchronous upload file
split definition and usage
The split () method is used to split a string into an array of strings.
Grammar
Stringobject.split (Separator,howmany)
Parameter description
Separator required. A string or regular expression that splits the
In my last essay, I analyzed jquery's constructor, which has a prototype method Init is the real constructor, Using the prototype object of Init to maintain a referential relationship with the jquery prototype object makes the instance of Init
There are mainly three kinds of methods
Conversion functions, coercion type conversion, the use of JS variable weak type conversion.
1. Conversion function:
JS provides the parseint () and parsefloat () two conversion functions. The former
This example describes the use of the Get () method in jquery. Share to everyone for your reference. The specific analysis is as follows:
This method can return an array that matches all the DOM elements in the collection or a DOM element of a
Let's take a look at three algorithms and how they behave in various browsers.
The first: Direct manipulation of the DOM.
Copy Code code as follows:
"Http://www.w3.org/TR/html4/loose.dtd" >
new Web project
the
This example describes the jquery node element attribute operation method. Share to everyone for your reference. The specific analysis is as follows:
In jquery, the attr () method is used to get and set the element properties, Removeattr () method
For example:
Copy Code code as follows:
var date1 = new Date ("2013-11-29");
var date2 = new Date ("2013-11-29");
Console.log (date1 = = Date2); False
Here, Date1 and Date2 look the same, but running date1 = = Date2 returns
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