60 useful jQuery code development skills collection and jquery development skills
We recommend that you use CTRL + F to search for more contents.
I accidentally saw these good jQuery code development skills on the Internet. 30 original articles were
There are a few things you need to know before making a clock:Calculation of point coordinates on a circleSecond, the clock on the hour, minute, second hand conversionWe look at the clock, and the first thing we think about is the angle . Then there
What is JScript?JScript is an active scripting language developed by Microsoft and implemented based on ECMAScript specifications. JavaScript in Internet Explorer actually refers to JScript. JScript is supported by Windows Script Host (WSH)
Obtain the date range of the week according to the weekObtain the date range of the week according to the week
/*** Return the range of Weekly Times of a month in a certain year * @ param weeks Weekly Times * @ return the range of dates of the
JavaScript defines two built-in objects: Global and Math.First, global object 1.URI encoding methodThe encodeURI () and encodeURIComponent () methods of the global object can encode the URI for sending to the browser. A valid URI cannot contain
Cookies are generated by the server and sent to User-agent (typically a browser), and the browser saves the key/value of the cookie to a text file in a directory, The next time you request the same Web site, the cookie is sent to the server
When you use Sdmenu.js in your project, you need to clear the cookie when you log on, and Sdmenu will save the cookie by default.Here's how sdmenu.js saves cookiesDocument.cookie = "Sdmenu_" + encodeuricomponent (this.menu.id) + "=" + States.join (""
Copy codeThe Code is as follows:Var getMonthWeek = function (a, B, c ){/*A = d = current dateB = 6-w = there are still several days to finish the current week (not today)Divide the sum of a + B by 7, which is the week of the current month.*/Var date
JQuery API Chinese file address: http://www.hemin.cn/jq/index.htmlJQuery Chinese Community: http://www.jquery.org.cn/1.siblings ()Gets a collection of elements that contain all unique sibling elements of each element in the matching element
Some browsers in the old version do not support javascript scripts. When a script node is used as a normal content output, sometimes to make the version compatible, comments will be written in the content of the script node. In this way, even though
/** date needs to be formatted * FARMATSTR requires a formatted style such as: Yyyy-mm-dd*/function DateFormat (DATE,FORMATSTR) {//Convert to date type var date = new Date (d ate); var opt = {' yyyy ': date.getfullyear (), ' MM ': Addzero
However, if you want to add more styles for the website to allow visitors to choose from, or if you want to adjust the style of the website and let the visitor reflect it before making a decision, this is also a good way to save the trouble of
Java code
// Convert the date type to string
/**
* Extended Date: converts Date to a String in the specified format.
* Month (M), Day (d), 12 hours (h), 24 hours (H), minute (m), second (s), Week (E), quarter (q) can use 1-2 placeholders
* Year
Javascript:
Function systemDate (){
// Obtain the system time
Var date = new Date (); www.2cto.com
Var month = date. getMonth () + 1; // month defaults to 0-11, so add 1
Var minutes = date. getMinutes (), Min;
Var seconds = date. getSeconds (),
Copy codeThe Code is as follows:/*** Format the date* @ Param {Object} The MS specifies the number of milliseconds for the global standard time between the date and midnight, January 1, January 1, 1970* @ Return year-month-date hh: mm*/Util.
Google's friends who often use google will surely remember the beautiful calendar controls of google, so we will also implement a process. Although the functions and effects are not comparable, what is important is the implementation process.The
function counter () {
var date = new Date ();
var year = Date.getfullyear ();
var date2 = New Date (year, 12, 31, 23, 59, 59);
/ * Convert into seconds * /
var time = (date2-date)/1000;
var day = Math.floor (Time/
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.