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
Browsing the site often see the site, the sidebar of some content scrolling to the top of the page after the fixed in that position, no longer follow the scroll bar and scrolling. This effect is called "Side bar follow scrolling". It is useful for
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.
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
Shortcut keys in the daily use is still quite a lot of, for example, familiar paste Ctrl + V, copy Ctrl + C, use shortcut keys to improve our efficiency, especially when we are familiar with an operation, it will become very convenient to use it
idea of a
The first kind of thinking is two-step
The first step: Bind the event handler to the document's Click event so that it hides the div
Step two: Bind the event handler on the div click event, prevent the event bubbling, prevent it from
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:
JSON string:var str1 = ' {' name ': ' cxh ', ' sex ': ' Man '} ';JSON object:var str2 = {"Name": "Cxh", "Sex": "Man"};
One, JSON string converted to JSON object
To use the above str1, you must first convert to a JSON object by using
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 data that is dynamically output on the page, this is the data that Ajax obtains I want to show on the page
Copy Code code as follows:
Success:function (data) {
var arr = Data.split ('_');
var Numarr = Arr[0].split (",");
var
The table structure of HTML is as follows:
Copy Code code as follows:
class= "TableStyle1" cellspacing= "0" >
Serial number
Part model
part name
Quantity
No tax Price
Tax-included Price
Tax
Payment
Whole
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