Javascript uses regular expressions to control input values in the input box.

1. Only numbers are allowed. 2. Only English letters, numbers, and underscores (_) are allowed) 3. Only English letters, numbers, and = @ # are allowed @# 4. Only uppercase letters and numbers are allowed. 5. Only Chinese characters are allowed.

Sample Code of jQuery loop rolling news list

Recently, for project reasons, I learned jquery and implemented a small function, that is, click the previous one of the announcements to view the scroll bar. The Code is as follows:Copy codeThe Code is as follows: test announcement of the Office:

Example of multiple select multiple

Copy codeThe Code is as follows: Apple peach bananas orange Selected project: before you click "select multiple", select multiple options at the same time. After you click "select multiple", try again.

Common system constants and system variables in thinkphp

-------------------------------------- System variables and constants used in the template ----------------------------------------(1) System Variables: Output System variables in the template, including server, env, session, post, get, request, and

Simple implementation code for js to determine the ie version number

In addition to judging the browser version number (recommended Feature Detection), jQuery 2.0 is a native Judgment Method written by a foreigner. This code is really clever! Both introduction and backward compatibility! The general practice is:

Differences between Document. location. href and. replace

Both document. location. href and document. location. replace can be switched from page A to page B, but their differences are:After switching with document. location. href, you can return to the original page.After switching with document. location.

Jquery Method for ajax form submission

Method 1:Copy codeThe Code is as follows:Function AddHandlingFeeToRefund () {Var AjaxURL = "../OrderManagement/AjaxModifyOrderService. aspx ";Alert ($ ('# formaddhandlinger'). serialize ());$. Ajax ({Type: "POST ",DataType: "html ",Url: AjaxURL + '?

Press enter to directly click a button to trigger the click event.

Copy codeThe Code is as follows:// Press enter to trigger a button click event Search Http://img.blog.csdn.net/20140227095828937? Watermark/2/text/plain/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA ==/ dissolve/70/gravity/SouthEastCopy codeThe Code

Example of using the settimeout method and parameters in js

W3school for simple useThere is no parameter call,Example:Copy codeThe Code is as follows: The problem I have now is that only the last one is passed back. Think about it.I still don't quite understand.Copy codeThe Code is as follows:/* For (var I =

Simple tabs: How to Create js and jquery

Copy codeThe Code is as follows: untitled document Title 1 Title 2 Title 3 content 1 content 2 content 3 Title 1 Title 2 Title 3 content 1 content 2 content 3

Example of back-and-forth conversion of js amount formatting

Let's look at the example:Copy codeThe Code is as follows:Function fmoney (s, n) // s: Number of float passed in. n: number of decimal places to be returned.{N = n> 0 & n S = parseFloat (s + ""). replace (/[^ \ d \.-]/g, ""). toFixed (n) + "";Var l =

Examples of using createTextRange () include some text content selected in the text box

Copy codeThe Code is as follows: Obtain the selected text in the specified text box: only the first text box is returned.Copy codeThe Code is as follows: Reverse search of page textCopy codeThe Code is as follows:Ababababababa Focus the control and

Example of script merge to improve javascript Performance

When each Script Example Hello world!

Call the focus of the DOM object to get the focus of the text box.

Because the object obtained in JQuery is still a JQuery object, using focus () only enables this object to obtain the onFocus () function. It cannot be the object that gets the focus, so it is necessary to get the focus of the object, the focus

Simple js Code to achieve selece level-2 Association (recommended)

The following is the html code:Copy codeThe Code is as follows: New Document Secondary linkage:== select == Chinese English French == select ==

Implementation Code for javascript return to the top

Copy codeThe Code is as follows:// Speed rolling speed time IntervalFunction gotoTop (speed, time ){ Speed = Rate | 0.1;Time = time | 16; // Horizontal distance from the scroll bar to the top of the pageVar x = document. body. scrollLeft; //

How to organize js open a new window

Window. location = "aaa. aspx"The preceding method can only be opened on the current page. to open a new page, use the following methodForm.tar get = "_ blank ";Form. action = "aaa. aspx ";Form. submit ();Window. top. location = url can be refreshed

JS controls how a DIV layer disappears within a specified period of time

Copy codeThe Code is as follows: timed closed layer wwwwwwwwwwwwwwwwwwwwww!

How to Use AngularJS framework to implement control verification with a line of JS Code

As shown in, we need to implement the following verification functions: All controls are mandatory controls.The maximum length must be controlled.When the page is opened for the first time, the control cannot be displayed as an errorAfter the input

Use ajaxfileupload. js to upload files to php through ajax

Both PHP and other server scripts provide the file upload function, which is easy to implement. With JavaScript, you can upload files in Ajax mode. Although jQuery does not provide such a simplified function, many plug-ins can implement it. Among

Total Pages: 5378 1 .... 3882 3883 3884 3885 3886 .... 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.