[Javascript]// Obtain the last day of a monthFunction getLastDay (year, month ){Var new_year = year; // returns the current year.Var new_month = month ++; // obtain the first day of the next month for easy calculation (the last day is not fixed)If
[Javascript]Function jsonObj (){ Var person = {name: 'hangsan', pass: '000000', 'sni. ni': 'xmq ', back: function (){For (var I = 0; I // You can traverse through the for loop without knowing the number of parameters// Arguments, which is provided
Each time alert is used to output information, the amount of information is small, and debugging is inconvenient. This method can better write js Code. Because Jquery is used more often, only the debugging method of Jquery is written, you can also
1.11 self-invoking anonymous functionOpen the jQuery source code. First, we can see the code structure:[Javascript] (function (widow, undefined ){// Code ....}) (Window) This is a self-called anonymous function. So what is it? In the first bracket,
We are too familiar with the form passing value in struts2. It is very easy to pass one or more values or attributes of an object.
But what should we do if we want to upload an array and want struts to receive it correctly?
The following describes
Right-click the map window and write the following javascript code into a separate script. You can directly introduce the html page of the map window:
Require (["dojo/ready", "dijit/Menu", "dijit/MenuItem", "dijit/CheckedMenuItem",
Javascript file operations (IE)
I. function implementation core: FileSystemObject objectTo implement file operations in javascript, FileSystemobject objects are primarily used.Ii. FileSystemObject ProgrammingIt is very easy to program with
Example: CRUD: Row editing
1. Create a cell Editor
Url = "../data/DataService. aspx? Method = SearchEmployees "># employee account gender age Date of birth creation date For example, the property of mini-textbox is "editor", which indicates the
With JQuery, We can customize event functions, as shown in
[Javascript]$ ("# Foo"). click (function (e ){// Do work});We can also simulate the occurrence of click events, such
[Javascript]$ ("# Foo"). click ()Sometimes we need to distinguish this
After the modification, no store or model was created at the time of sending.A feature is added based on the previous version. click the Button on the left to add a new tab on the right, add the page and grid to the tab, and review the previous
Some core methods of JQuery
$ ("Element"). length; 'number of elements, which is an attribute$ ("Element"). size (); 'is also the number of elements, but parentheses are a method.$ ("Element"). get (); 'a collection of elements on the page, stored
Angus Croll, a front-end engineer from Twitter, gave a speech entitled "Break all the Rulez" at the JSConf conference in Berlin. I mainly talked about some things that we generally think are wrong and should not be used. They are actually useful.
Requirement: Two DateField controls: Start Time and end time. After the end time is selected, the month or number of days between the two time periods are automatically calculated.
Problems to be Solved:
1. The date obtained by directly using Ext.
When the charset page is a Utf-8 and the file is UTF-8 encoded, garbled characters appear in the alert dialog box of javascript.This is because the Chinese browser uses the default encoding gb2312.In the following writing method, garbled characters
Parse json. I only like simple things. gson is relatively simple. I have been using it. Today I encountered a problem in processing generics.
The object classes used are as follows:
1Class Option {2Public String itemValue;3Public String itemLabel;4 5
It's boring to work overtime. You can write an egg in a few minutes to entertain yourself...
The implementation effect is very simple. The j/k key is used to automatically roll the previous or next dynamic information. Like twitter, Weibo, and g +,
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.