Use javascript to control the effective time and display the time to expire

JavaScript sets a time validity period. I feel that the code is too concise when using jQuery. This is a piece of js code written by my colleagues. I learned it myself.Copy codeThe Code is as follows: untitled document within one day within two

Use the simple jQuery method to implement the line color replacement function

Today, toggleClass () is a simple method to implement line-by-line color change: the code is as follows:Copy codeThe Code is as follows: line-by-line color change foothome foothome foothome foothome foothome foothome foothome

Using jQuery to quickly solve the problem that placeholder values in input cannot be supported in ie

Copy codeThe Code is as follows: untitled document User name:

Use window. name To share windowStorage code

Copy codeThe Code is as follows:// Key: value | key: valueVar windowStorage = {_ Inited: false,_ Data :{},Init: function (str ){Var tmpData, key, value, kv;This. _ inited = true;If (str & typeof str = 'string '){TmpData = str. split ('| ');For (var

Compress numeric functions using hexadecimal Conversions

Copy codeThe Code is as follows:Function zipNum (num, radix ){If (! ZipNum.zip ){ZipNum.zip = function (inputNum ){If (inputNum> 35) {// use uppercase letters to indicate 36-61Return String. fromCharCode ('A'. charCodeAt (0) + inputNum % 36 );} Else

How to process timestamp in javascript in Date Format

Public processing timestamp FunctionsCopy codeThe Code is as follows:/*** Convert the processing timestamp to the date format* @ Param {Object} obj timestamp {10-bit timestamp must be multiplied by 1000; 13-bit timestamp is not required}* @ Return

How to obtain client computer hardware and system information using JavaScript

JavaScript to obtain client computer hardware and system informationWMI is used to obtain the hardware and system information of the client computer:Copy codeThe Code is as follows:Function getSysInfo (){Var locator = new ActiveXObject

JavaScript code to dynamically change the font size

Copy codeThe Code is as follows: modify font size. html --> large medium small Here is the text displayed. Click the hyperlink above to change the font size. Here is the text displayed. Click the hyperlink above to change the font size. Here is

JQuery (JavaScript) to get the text width (display length)

Today, I encountered the problem of obtaining the text width. After a long time, I finally found a method on a foreign website, but I couldn't use it directly. So I modified it and successfully used it in the project, here we will share with you.

Use css3 to achieve the border rounded Corner Effect

It is often seen that someone else's website has a border to modify the text area, similar to the rounded rectangle to wrap the text, especially feeling, so I tried to use the border to modify the image, however, using too many images will slow the

JQuery Wookmark-2 jQuery dynamic table plug-in effect display

I have previously written an article on Wookmark in my blog, which can only be a simple introduction. As for its internal usage and effect display, I have not specifically written it out, today I will briefly present some of the methods and effects

Jquery obtains the sample code of keycode.

As follows:Copy codeThe Code is as follows:TxtSearch: text box ID $ ("# TxtSearch"). keyup (function (event ){Var keycode = event. which;If (keycode = 13 ){Alert ('you have pressed the enter key '); } }); Or XObj. keyup (function (event ){// Obtain

Prohibit IE from using right-click JavaScript code

Copy codeThe Code is as follows: Document. body. oncontextmenu = function rightClick () {window. event. returnValue = false ;}

Example of adding option dynamically in jquery

Add option dynamically in jquery Add option dynamically in js Copy codeThe Code is as follows:Var sel = document. getElementById ("Selected1 ");Sel. options. add (new Option ("select ",""));Sel. options. add (new Option ("name", "id ")); Add

Js verification input is a mobile phone number or phone number example

The Code is as follows:Copy codeThe Code is as follows:

How to obtain the non-repeated values of three Arrays

Copy codeThe Code is as follows:Var a = ["a", "B", "c"],B = ["B", "c", "d"],C = ["c", "d", "e"],_ A = a. concat (B). concat (c ),_ Hash = {},_ New = [];For (var I = _ a. length; I --;){If (! _ Hash [_ a [I]) {_ Hash [_ a [I] = 1;_ New. push (_ a [I])

Input page, open new page, and so on

1. Link to a pageOnclick = "location.hrefw.'filename.html '"/>2. Return (equivalent to back)Onclick = "location. href = 'javascript: history. go (-1); '" value = "return"/>3. Open a new webpageOnclick = "Getting Started open('filename.html ')"/>4.

Solutions to JavaScript compatibility between IE and FireFox

The following are the situations I encountered during development: 1. dynamically delete a row in the table. Table: indicates a table object. K: indicates the row number. Table. rows [k]. removeNode (true); // firefox execution failed, ie execution

Common JavaScript compatibility problems and related solutions (chrome/IE/firefox)

The version of my browser is chrome15.0.874.121 Firefox 8.01 IE9 IETester. The following Code declares 1: Obtain the scroll barCopy codeThe Code is as follows:Function getScroll (){Var t, l, w, h;If (document.doc umentElement & document.doc

Use javascript to determine whether a file exists

You can useCopy codeThe Code is as follows:Var fso, s = filespec; // filespec = "C:/path/myfile.txt"Fso = new ActiveXObject ("Scripting. FileSystemObject ");If (fso. FileExists (filespec ))S + = "exists .";ElseS + = "doesn' t exist .";Alert (s );You

Total Pages: 5378 1 .... 4031 4032 4033 4034 4035 .... 5378 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.