When you do the page, if you want to do nothing after clicking a link or respond to the click to complete other tasks, we can use javascript: void (0 ), the following describes how to use the link. If you want to click a link and do not do anything,
This article describes a small example of the maximum number of characters and the number of times that appear in a string in javascript. If you need it, refer to it.
The Code is as follows:
Untitled document
Script
Var str =
Jsonp, short for JSONwithPadding, is a solution for cross-origin request resources. Let's take a look at how it is used.
First glance at jsonpJsonp is short for JSON with Padding. It is a solution for cross-origin request resources. Most of the time,
Convert an object to a string: Use the JSON. encode method. This is the method in json. js. You can introduce it to the current file. The following is a bit more detailed. Do not miss it if you are interested.
Conversion between objects and strings
This article introduces a small example of javascript jitter elements. For more information, see
The Code is as follows:
Xxxxxx ScriptFunction shake (e, onComplete, distance, interval){If (typeof e = "string "){E = document. getElementById (
Javascript calculates the time difference function. The obtained time difference is in the format of year-month-day hour: minute: Second or year-month-day hour: minute: second. I wrote it myself. It is only applicable. It is not very good and should
There is an idtest drop-down box. How can I get the selected value? In this article, we will use the javascript native method and the jquery method (provided that the jquery library has been loaded) to simply implement the drop-down box with id =
Use javascript to operate the JSON class library TAFFYDB. This section describes how to query, add, delete, and modify data. Some time ago, Json data was used in work, and some simple additions, deletions, modifications, and queries can be placed on
This article introduces several types of code for closing a JS window or closing a page in JS. If you need it, refer to the first one: automatically closing a window in JS at regular intervals.
The Code is as follows:
This article introduces a simple hexadecimal conversion code example in javascript. For more information, see
The Code is as follows:
10 hexadecimal 2 hexadecimal Decimal: Binary:
Js browsing the local Folder system is incredible. The test results are still good. If you are interested, refer
The Code is as follows:
Function BrowseFolder (){Try {Var Message = "select folder"; // The selection box promptsVar Shell = new
This article introduces how to implement FunctionTest in Node. js. If you need it, refer to it.
InfoLast week, my colleagues at meeting said that they are currently using java to write function test, resulting in a lot of redundant code, and the
You can customize the image, Link, length, and width of an advertisement. Moving the cursor over the image will show the left and right arrows. If you need them, please refer to them.
The Code is as follows:
Scroll up and down on
The following describes eight practical JavaScript frameworks. If you need them, please refer to them.
1. Hammer. jsHammer. js is a lightweight JavaScript framework widely used. It provides specifications for common touch operations, such as
There have been many articles about checkbox all-choice invert selection in the past, and I really don't want to mention it. However, there are still some friends around me, so I wrote an estimate that there are many bugs in three minutes.
The
Js does not have trim functions, but you can write one by yourself. The following implementation method uses regular expressions, which is efficient, add the three methods to the built-in methods of the String object. js does not have trim functions,
Recently, many JavaScript data verifications were performed in the project. to unify the style and port reuse, Jquery plug-ins were encapsulated.
The Code is as follows:
(Function ($ ){Var defaults = {BugColor: '# ffcccc', // text box color when
The JSDate object is used to process dates and times. It is widely used in projects. The following describes how to sort out the JSDate function. If you are interested, refer to the JS Date object for Date and time processing.
Syntax for creating a
Setting cookie expiration in js is equivalent to clearing the cookie with the corresponding browser name. The following is a good example. If you are interested, refer
The Code is as follows:
Function ClearCookie (){Var expires = new Date
Different browsers or versions have different support for console objects, and the console method is a good tool during development and debugging. Is it necessary to remove all console. xxxx before going online to ensure that some Browsers Do not
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