Module Creation Constructor (Modules that create constructors)
In the previous example, a MYAPP.utilities.array object was created, but sometimes it is more convenient to create your object using the constructor, and you can implement it using the
Article Introduction: How the site does not need jquery at all.
JQuery is now the most popular JavaScript tool library.
According to statistics, currently 57.3% of the world's web sites use it. In other words, 10 sites, 6 use jquery. If
Article Introduction: Talk about the conflict prevention (noconflict) mechanism in jQuery.
Many of the JS framework class libraries choose to use the $ symbol as a function or variable name, JQuery is one of the most typical. In JQuery,
Displays a message to the user:
Alert ("Content");
Ask the user to click the OK or Cancel button and return a Boolean value:
Confirm ("content");
Waits for the user to enter a character channeling, and then the character is channeling back:
Prompt ("
Article Introduction: gets the two methods and their comparisons of the horizontal and vertical coordinates of the elements in the page to the document area.
Get the elements in the page to the document area. Two methods for horizontal
Five ways to use JavaScript to determine whether an HTML element exists:1. Determine if a FORM element existsif ("Periodpermonth" in Document.theform) {return true;}else{return false;}2. Determine if the page element existsif
Article Introduction: a complete set of JavaScript face test questions.
One, single topic 1, which of the following statements will produce a run-time error: (a,d) A.var obj = (); B.var obj = []; C.var obj = {}; D.var obj =//;
2.
var xpos;
var YPos;
Document.onmousemove = MouseMove;
function MouseMove (EV) {
EV = EV window.event;
var mousepos = mousecoords (EV);
Xpos = mousepos.x;
YPos = Mousepos.y;
}
function Mousecoords (EV) {
if (Ev.pagex ev.pagey) {
Share a JavaScript optimization technique for writing functions.
The applicable function should satisfy the following criteria:
produce a fixed result
Multiple calls on the page
Complex or more time-consuming
Code and analysis are as follows:
A
compatible with multiple browsers text timing up and down scrolling effect
li text effect 1
li text effect 2
li text effect 3
li text effect 4
li text effect 5
li text effect 6
li text effect 7
li text effect 8
li text effect 9
li text effect
After reading the "JavaScript King return", in the library to find "JavaScript design mode" To see, before the design mode of the book read: "Head of the first design mode", "design mode of Zen", Gof's "Designing Patterns: Elements of reusable
Calculates the number of weeks of the current date in this year
Date.prototype.getWeekOfYear = function (Weekstart) {//Weekstart: Weekly start in week: Sunday: 0, Monday: 1, Tuesday: 2 ..., default to Sunday
Weekstart = (weekstart 0)-0;
if (isNaN
Article Introduction: easy to use jquery form verification plug-in--jquery.validate.js.
Jquery.validate.js is a validation plug-in for jquery, and with the advantage of jquery, we can quickly validate some of the common inputs and
Internet | page | page
1. text box Input Restrictions
Implementation limit input large, lowercase English, digital, floating-point decimal, date, Chinese, some English, some Chinese and many other functions. Add it directly to the HTML code to use
Javascript| Form Submission | tips
1 form items cannot be empty
2 Compare the values of two table items3 form items can only be numbers and "_" for phone/bank account verification, can be extended to domain name registration, etc.
4 table Single
Javascript
One, screen Keyboard all keys
Second, shielding the right mouse button
Add Oncontextmenu=self.event.returnvalue=false to the body tag or:
function Nocontextmenu (){if (document.all) {Event.cancelbubble=true;Event.returnvalue=false;return
Javascript| Tips
1. oncontextmenu= "Window.event.returnvalue=false" will completely screen the right mouse button
no available for table
2. deselect, prevent copying
3. onpaste= "return false" is not allowed to paste
4. oncopy= ' return false; '
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.