This is used for the first time. Make a record and call the local program on the html page:Copy codeThe Code is as follows:Enter the path of the program to run: OK
As we all know, in PHP, time data can be directly converted to timestamps, so there are also ways to achieve this in front-end script js, that is, valueOf ()
For example, we can use this code to output the timestamp of the current time point.Copy
The jQuery element selector and attribute selector allow you to select HTML elements by Tag Name, attribute name, or content.
JQuery element selector:JQuery uses the CSS selector to select HTML elements.
$ ("P") Select the element.
$ ("P. intro")
To solve this problem, I wrote a function that intercepts strings based on the number of bytes yesterday.It is easy to use, just like String. subString (start, end. For example, var str = "cailove"; var str1 = str. subCHStr (2, 2); var str2 = str.
Copy codeThe Code is as follows:
Click Create album to display the page
Click "replace image" to replace the image at the specified position.
Click Delete node to delete the image node at the specified position.
Copy codeThe Code is as follows:// * JQuery url get parameters function [get url get parameter value]// * Character_set UTF-8// * Author Jerry. li (lijian@dzs.mobi)// * Version 1.2012.12.11.1400// * Example// * // * Var GET = $. urlGet (); // Get
I wrote the plug-in for the first time. Later I found a jquery plug-in template, and I took it. The name is jquery. boilerplate. js. I do not have a deep understanding of efficiency issues, and I do not quite understand efficiency issues.
I was
Extjs itself is a slow loading JS framework, which requires many optimization by programmers. We have mentioned the JS packaging optimization before.How to reduce redundant code writing this time is also to improve the running speed, including 1.
Today, I made a menu on the left, which should be frequently used in the background. The Code is also concise and clear, and can be used as a copy:As follows: The Code is as follows)Copy codeThe Code is as follows: click the left-side menu in the
The login page needs to capture the user's need to press enter to automatically submit:Add the onkeydown event jump javascript in the body to submit the form.The search documentation is as follows: The onkeydown event occurs when you press a
The replace () method is used to replace other characters with some characters in a string, or replace a substring that matches a regular expression.
Syntax: string. replace (subStr/reg, replaceStr/function)
The first parameter can be a substring of
Copy codeThe Code is as follows:Repaint: When repaint is changed, the appearance of the element is changed and the layout is not changed, such as changing outline, visibility, background color, does not affect dom structure rendering.
Reflow
In web development, we usually use js inevitably. We can place js Code directly on the page to use js internally. But in order to make the page "slim", we usually put the js Code outside and reference it through src. At this time, we need to pay
Copy codeThe Code is as follows:
Then the code in the centerpage.html framework, that is, the code in the tabs framework:
Copy codeThe Code is as follows: User name: creation start time creation end time Search clear
Jquery extension
Method 1. If you call other methods directly in ready, an error indicating that the object is missing is prompted. Using jQuery extension can solve this problem.
Copy codeThe Code is as follows:$ (Document). ready (function (){
$. Extend ({Show:
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service