jquery.third, the Extend method of jquery also has an overloaded prototype:
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->Extend (boolean,dest,src1,src2,src3 ...)The first parameter, Boolean, indicates whether to make a deep copy, the rest of the parameters are consistent with what was described earlier, what is called deep copy, and we look at an example:
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlig
= bar2 '.Example:
The Code is as follows:
$. Ajax ({Type: "POST ",Url: "some. php ",Data: "name = John location = Boston ",Success: function (msg ){Alert ("Data Saved:" + msg );}});
Here, the parameters following data can be written in two forms: one is to write common url parameters, and the other is to write them in a json array,The data section in the preceding example can also be written as follows: data: {name: "John", location: "
to perform a deep copy. The other parameters are the same as described above. What is "Deep copy"? Let's look at an example:
var result=$.extend( true, {}, { name: "John", location: {city: "Boston",county:"USA"} }, { last: "Resig", location: {state: "MA",county:"China"} } );
We can see that the child Object location: {city: "Boston"} is embedded in src1, and the sub-Object location: {state: "MA
to perform a deep copy. The other parameters are the same as described above. What is "Deep copy"? Let's look at an example:
VaR result = $. Extend ( True , {}, {Name: " John " , Location: {city: " Boston " , County: " USA " }}, {Last: " Resig " , Location: {state: " Ma " , County: " China " }});
We can see that the child Object Location: {City: "Boston"} is embedded in src1,
'
Instance name is 'ctsdb'
Service name is 'ctsdb. standby'
Site is maintained as physical;
Activate configuration Scheme
Dgmgrl> enable configuration;
Activate Resources
Dgmgrl> enable resource 'ctsdb ';
The log Transfer Mode of the resource must match the data protection mode of the primary database. For example, if the data protection mode is maximize availability, You need to configure the resource's logxptmode attribute to sync.
Dgmgrl> alter resource 'ctsdb' on site '
:$. Extend ({net :{}});
This is to expand a net namespace in the jquery global object.$. Extend ($. net ,{
Hello: function () {alert ('hello ');}
}) This is to extend the hello Method to the expanded Jquery net namespace.
III. The extend method of Jquery also has an overload prototype:Extend (boolean, dest, src1, src2, src3 ...)
The first parameter 'boolean' indicates whether to perform a deep copy. The other parameters are the same as described above. What is "Deep copy"? Let's look at an examp
whether to perform a deep copy. The other parameters are the same as described above. What is "Deep copy"? Let's look at an example:Var result = $. extend (true ,{},
{Name: "John", location: {city: "Boston", county: "USA "}},
{Last: "Resig", location: {state: "MA", county: "China "}});
We can see that the child Object location: {city: "Boston"} is embedded in src1, and the sub-Object location: {state: "MA"
:"Tom",age:21},{name:"Jerry",sex:"Boy"})
Then the merged result
result={name:"Jerry",age:21,sex:"Boy"}
That is to say, if the following parameter has the same name as the preceding parameter, the following parameter will overwrite the preceding parameter value. 3. extend (boolean, dest, src1, src2, src3 ...)
The first parameter boolean Indicates whether to perform a deep copy. the other parameters are consistent with the previous descriptions.For example:
var result=$.extend( true, {}, { nam
whether to make a deep copy, the rest of the parameters are consistent with what was described earlier, what is called deep copy, and we look at an example:var result=$.extend (True, {}, {Name: "John", Location: {City: "Boston", County: "USA"}}, We can see that the nested SRC1 in the location:{city: "Boston"},SRC2 also nested the object location:{state: "MA"}, the first deep copy parameter is tr
parameter, Boolean, indicates whether to make a deep copy, the rest of the parameters are consistent with what was described earlier, what is called deep copy, and we look at an example:var Result=$.extend (True, {},{Name: "John", Location: {City: "Boston", County: "USA"}},{Last: ' Resig ', location: {state: ' MA ', County: ' China '}});We can see that the nested SRC1 in the location:{city: "Boston"},SRC2
of the parameters are consistent with what was described earlier, what is called deep copy, and we look at an example:var result=$.extend (True, {}, {Name: "John", Location: {City: "Boston", County: "USA"}}, We can see that the nested SRC1 in the location:{city: "Boston"},SRC2 also nested the object location:{state: "MA"}, the first deep copy parameter is true, then the result of the merge is:Re
, the rest of the parameters are consistent with what was described earlier, what is called deep copy, and we look at an example:var result=$.extend (True, {},{Name:"john, location: {City : "boston" ,county: "usa" {last: " resig, Location: {state: Ma ",county:" china " We can see that the nested SRC1 in location:{city: "Boston"},SRC2 also nested the object location:{state: "MA"} , the first dee
, indicates whether to make a deep copy, the rest of the parameters are consistent with what was described earlier, what is called deep copy, and we look at an example:var result=$.extend (True, {},{Name:"john, location: {City : "boston" ,county: "usa" {last: " resig, Location: {state: Ma ",county:" china " We can see that the nested SRC1 in location:{city: "Boston"},SRC2 also nested the object
make a deep copy, the rest of the parameters are consistent with what was described earlier, what is called deep copy, and we look at an example:varResult=$.extend (true, {}, {name:"John", Location: {City: "Boston", County: "USA"}}, {last:"Resig", Location: {state: "MA", County: "China"} } ); We can see the nested location:{city in SRC1:},SRC2 also nested in "Boston" Location:{state: "MA"}, the first deep
parameters are consistent with what was described earlier, what is called deep copy, and we look at an example:var Result=$.extend (True, {},{Name: "John", Location: {City: "Boston", County: "USA"}},{Last: ' Resig ', location: {state: ' MA ', County: ' China '}});We can see that the nested SRC1 in the location:{city: "Boston"},SRC2 also nested the object location:{state: "MA"}, the first deep copy paramete
look at an example:var true , {}, "John", Location: {City: "Boston", County: "USA"}, "Resig", Location: {state: "MA", County: "China"});We can see that the nested SRC1 in the location:{city: "Boston"},SRC2 also nested the object location:{state: "MA"}, the first deep copy parameter is true, then the result of the merge is:Result={name: "John", Last: "Resig", location:{city:"
the parameters are consistent with what was described earlier, what is called deep copy, and we look at an example:true, {}, {Name: "John", Location: {City: "Boston", County: "USA"}}, We can see that the nested SRC1 in the location:{city: "Boston"},SRC2 also nested the object location:{state: "MA"}, the first deep copy parameter is true, then the result of the merge is:result={Name: "John", Last
instances:$. Extend ({net :{}});
This is to expand a net namespace in the jquery global object.$. Extend ($. net ,{
Hello: function () {alert (
'
Hello
');}
})
This is to extend the hello Method to the expanded Jquery net namespace.
III. The extend method of Jquery also has an overload prototype:Extend (boolean, dest, src1, src2, src3 ...)
The first parameter 'boolean' indicates whether to perform a deep copy. The other parameters are the same as described above. What is "Deep copy"? Let's look
object.
$. Extend ($. net, {hello: function () {alert ('hello ');}})
This is to extend the hello Method to the expanded Jquery net namespace.
III. The extend method of Jquery also has an overload prototype:
Extend (boolean, dest, src1, src2, src3 ...)
The first parameter 'boolean' indicates whether to perform a deep copy. The other parameters are the same as described above. What is "Deep copy"? Let's look at an example:
Var result = $. extend (true, {}, {name: "John", location: {city: "
of the parameters are consistent with what was described earlier, what is called deep copy, and we look at an example:var result=$.extend (True, {}, {name: "John", Location: {City: "Boston", County: "USA"}}, We can see that the nested SRC1 in the location:{city: "Boston"},SRC2 also nested the object location:{state: "MA"}, the first deep copy parameter is true, then the result of the merge is:Re
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.