In The morning, I saw The article "JavaScript Weekly Guide" [Phase 3], in which I found an article (Extending JavaScript-The Right Way). I think it is not bad. I will share it with you through translation, this document is not translated word by
The following describes how to use string in javascript:
String class attribute and MethodAnchor () creates an tag instance and sets its name attribute to the string passed to this method.Big () converts a string to an instance of the tag.Blink (
String class Attribute and methodAnchor () creates an tag instance and sets its name attribute to the string passed to this method.Big () converts a string to an instance of the tag.Blink () converts a string to an instance of the tag.Bold ()
The examples in this article summarize the usage of traversal functions commonly used in jquery. Share to everyone for your reference. Specifically as follows:
1. Children () function
The children () function is used to select the child elements
String class Attribute and Method Anchor () Create an instance of the tag, Set its Name property to the string that is passed to this method big () Convert a string to an instance of the tag blink ()
Uncle Bob proposed and carried forward the Five Principles S.O.L. I. D to better implement object-oriented programming.
Uncle Bob proposed and carried forward the Five Principles S.O.L. I. D to better implement object-oriented programming. The five
Recently, I saw the criptquiz vulnerability in Perfectionkill. After doing so, I finally got two wrong questions (#2, #9). However, the two questions have different answers under Ie and ff ?! The official address is
Sysdate[Function]: returns the current date. [Parameter]: No parameter, no brackets [Return]: Date [Example] select sysdate hz from dual; return:
Add_months (d1, n1)[Function]: return the new date after the date d1 plus the n1 month. [Parameter]: d1,
Javascript derivation of Y-Combinator (from Jim Weirich) and ycombinator
Anyone familiar with functional programming knows about lambda expressions. The lambda expressions in programming languages are derived from the lambda algorithm invented by
The entire framework is being restructured so that the namespace object Dom is also out of the same inheritance system, just like the type object of mootools1.3.
The objective of V2 is roughly as follows:
Reduces modularity and only
The ie for... in loop has serious defects. In addition to its low performance, many attributes cannot be traversed. The famous three brothers are constructor, tostring, and valueof. But the actual situation is even worse. The following is a test
The official address is http://perfectionkills.com/javascript-quiz/.
CopyCode The Code is as follows: 1.
(Function (){
Return typeof arguments;
})();
"Object"
"Array"
"Arguments"
"Undefined"
2.
VaR F = function g () {return 23 ;};
Typeof g
Routing configuration file
Definition: A route is a Uniform Resource Identifier (URI) that parses a request from a client and distributes the request to the expected processing logic (matching the request address) according to the rules set, which
JS design mode 7: decorator ModeDecorator Pattern. The object function is dynamically extended without changing the original class and inheritance. By packing an object, a new object with the same interface of the original object is
JavaScript's execution environment defines variables and functions that have access to other data and modify their values. Each execution environment has a variable object that defines all the variables and functions in the environment. The global
If (! Document. all ){// Zzcv ff ie compatible script/* Unresolved issues and handling of the script:2. in IE, you can use () or [] to obtain the collection class object. In Firefox, you can only use [] to obtain the collection class object.Solution:
Get an array of characters
String.prototype.tochararray=function ()
{
Return This.split ("");
}
Get n the same string
String.prototype.repeat=function (num)
{
var tmparr=[];
for (Var i=0;iReturn Tmparr.join
Objective
Uncle Bob proposed and carried forward the five principles of S.O.L.I.D for better object-oriented programming, the Five Principles are:
The single Responsibility principle (SRP for sole responsibility)
The open/closed principle (opening
if (!document.all) {
ZZCV FF IE compatible script
/* Script does not solve the problem and processing:
2.IE, you can use () or [] to get the collection class object; Firefox, you can only use [] to get collection class objects.
WORKAROUND: Use []
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.