Ah, it's really not easy to develop some projects .... After an hour, I searched for various materials and finally finished the basic functions of the font color palette. The uidesign skills need to be improved. First look at the effect:
Function
When using node. js. If you want to add notes when using the. json file to store some configurations.However, because the string is read and then converted to a JSON object using json. parse, the conversion fails or even reports an error because of
Use jQuery to obtain the value of an element in the parent window in IFRAME.We had to use the DOM method and jquery method to achieve this.
1. In the parent window, select all radio buttons in IFRAME.$ (Window. frames ["iframe1" cmd.doc ument). find
Copy codeThe Code is as follows:// Determine whether it is a leap yearFunction isLeapYear (year ){If (year % 4 = 0 & (year % 100! = 0) | (year % 400 = 0 ))){Return true;}Return false;}// Judge the two dates before and afterFunction validatePeriod
In IE, A fireEvent method is provided, which, as its name implies, triggers an event. At the beginning, I thought it would be the same as using onclick () in normal times. I did not expect to find it when I was writing a javascript getting started
JQuery cookie is a good cookie plug-in. The general usage is as follows:Example $. cookie ('name', 'value ');Set the cookie value and set the value of the name variable to value.Example $. cookie ('name', 'value', {expires: 7, path: '/', domain:
Instanceof and typeof in JavaScript are often used to determine the type of a variable (instance), but they are used differently:
Typeof OperatorReturns a string that represents the expression's data type.
Typeof expression;
The expression parameter
The code of this magnifier is quite simple and has good results.Copy codeThe Code is as follows: Copy codeThe Code is as follows:/*Enlarge for jQuery v1.0Abel Yao, 2013*/(Function (e) {var I = {shadecolor: "# FFD24D", shadeborder: "# FF8000",
/**** @ Authors Benjamin* @ Date 2013-11-13 10:16:59*/I. FAQs about repeated submission A> click the submit button twice.B> Click Refresh.C> use the browser back button to repeat the previous operation, leading to repeated form submission.D> use the
Prototype is a method introduced in IE 4 and later versions for a certain type of objects, and it is particularly convenient: it is a method for adding methods to class objects! This may sound a little messy. Don't worry. I will explain this special
In the upper left corner of google.com.hk, there is a more link with a target address. However, when we click, in most cases, a drop-down list is displayed for users to choose from (this is a typical progressive enhancement form ). How can this
JSON and XML are no different, but JSON has a wider application, that is, cross-Origin data calling. Due to security issues, AJAX does not support cross-origin calls. Therefore, it is very troublesome to call data under different domain names. The
You may have heard of JAVA ,. NET, PHP and other languages have garbage collection memory management mechanisms, but few will hear that JavaScript also has its own memory management mechanism. JavaScript also has similar garbage collection functions.
Copy codeThe Code is as follows:$ ("# RegDate"). datepicker ({ShowMonthAfterYear: true, // displayed after yearChangeMonth: true, // month can be selectedChangeYear: true, // select a yearDateFormat: 'yy-mm-dd', // you can specify the date
A function has been developed recently, but it always becomes invalid when the cookie is deleted. Why is it unclear.
When $. cookie ("name", "") is used, a new null cookie is generated.
Use $. cookie ("name", null), and delete the cookie.
Last use$.
Copy codeThe Code is as follows:Var w = getClientSize (). width;Var h = getClientSize (). height-97; Copy codeThe Code is as follows:Function getClientSize (){Var a = h = 0;If (window. innerHeight ){A = window. innerWidth;H = window. innerHeight}
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.