JS back-Projection advertising code

<html> <head> <meta http-equiv= "Content-type" content= html; charset=gb2312 "/> <title>js back Advertising code </title> </head> <body> <script ...

JS Gets the value implementation code of SELECT

A very simple use of JS to get select the current selection of the value code, in the select has a special current value should be to get its options selectedindex value, so that we can like ojb.options[ Obj.selectedindex].value to get it. <!doctype HTML PUBLIC "-//w3c//dtd XHTML 1.0 transitional//en&quo ...

Javascrip Message Confirmation Popup implementation code

Javascrip Message Confirmation Pop-up implementation Code alert-Pop-up message dialog box (there is a OK button in the dialog <script language= page special effects > <!--alert ("N This enterprise is: DD")%> n but you can contact the enterprise by the following methods N Tel: &n ...

JavaScript gets the cursor position code of the TEXTAREA element

Web effects get the TEXTAREA element's cursor position code <!doctype html> <html xmlns= "http://www.w3.org/1999/xhtml" > <head> < Meta http-equiv= "Content-type" content= "HTML;

JavaScript character conversion numeric function

In the JS to convert the character to the number of parseint () parsefloat () () Three functions, let us explain their syntax and use methods. About the number function numbers object is the wrapper object for the original numeric value. Create syntax for number object: var mynum=new number (value); var mynum=number (value); parameter parameter value is the Numbe ...

JavaScript string types are converted to date types in several ways

If there are spaces or other delimiters in the string, you can split the Split method, return an array, and then pass the year and month in the array as arguments to new date () to generate the date type; if there is no special separator, you can use SUBSTR (x, Y) method to take a substring to generate a date, substr (X,y), X represents the start of the string, and Y indicates the length of the substring! If the string is "/" split can be converted using Date.parse (DATESTR) ...

JavaScript slides into the couplet ad code

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <html xmlns=" http://www.w3.org/1999/xhtml ...

JavaScript replace (/-/g, "!") Replace all specified characters

Use Web Effects str.replace (/-/g, "!") You can replace all the matching characters (G is the global flag). <script type= "Text/javascript" > String.prototype.replaceall = function (Reallydo, replacewith, ignorecase) {...

Simple feed conversion code in JavaScript

In JavaScript, use the ToString () and parseint () functions to convert numbers into the system! <! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" http://www.w3.org/TR/xhtml1/DTD/x ...

Zoom out on a local page [support IE, Chrome browser]

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "> <html ...

Web page couplet advertisement code effect Daquan

Now a lot of website advertising to do in full swing, now I would like to introduce the common couplet floating advertising effect of the code use method, introduced this effect, in the 1024x768 resolution of the normal display, in the 800x600 resolution can automatically hide, so as not to cover the page affect visitors browsing content,     Here is the code needed to implement the effect: Var delta=0.015 var collection; ...

JavaScript random draw Math.random () function

Since the creation of web effects, many browsers have built-in random number generation method. For example: Var number =math.random (); This method produces a floating-point number between 0 and 1. Rnd.today=new date (); Rnd.seed=rnd.today.gettime ();     function rnd () {rnd.seed = (rnd.seed*9301+49297)% 233280; ...

JS how to determine whether the contents of the FCK editor is empty

Because the FCK editor differs from other TEXTAREA file input boxes, it is not the same that all of them should be judged to be empty. var oeditor = fckeditorapi.getinstance (' content '); The content here is FCK ID value if (getlength ("content") <=0) {alert (' contents cannot be empty! '); Oeditor.focus ();

Practical JS Get CheckBox value Code

<html> <head> <meta http-equiv= "Content-type" content= html; charset=gb2312 "/> <title>getelementsbyname paradigm </title> <script type= ...

ID Card validation JavaScript implementation

Take to the grand, so the copyright belongs to Shanda Online all function nunber () {var Idcard=document.getelementbyid (' U_nunber '). Value; var errors=new Array ("Verify through!", "ID number is not correct!", "...

JavaScript event binding method and compatible IE FF solution

Web page Effects Event binding method and compatible IE FF solution var t = document.getElementById ("Tab1"); T.onclick = function TST () {alert (');} The second method var TB = document.getElementById ("Tab1"); if (Window.ad ...

JavaScript Password telephone Fax ZIP code keyword Verification

function ispasswd (s) {var patrn=/^ (w) {6,20}$/; if (!patrn.exec (s)) return false return True}//verify normal telephone and fax number: You can start with "+", except for numbers, Can contain "-" code as follows: function Istel (s) {//var patrn=/^[+]{0,1} (d) {1,3 ...

JavaScript compatible IE,FF settings home, add favorite code

If you want to be compatible with multiple browsers to determine the user's browser type, if it is Firefox or ie6,7,8, so that they can not be judged by the difference between the operation. <html xmlns= "http://www.w3.org/1999/xhtml" > <head runat= "Server" > <title> Untitled page </title>

Set as home code and add to Favorites JS Code encyclopedia

Set as home code and add to Favorites Code Encyclopedia (detailed) ************* take it off. When you close a Web page, pop-up set as Home dialog code: Copy code <body id=iehomepage onunload= " Iehomepage.style.behavior= ' url (#default #homepage) '; Iehomepage.ishomepage (' ...)

Use JavaScript to add a date to a Web page

We all know that using dreameaver to add time and date to a page, we use JavaScript today to implement this function, and to understand the role of JavaScript in the Web programming language,   The principle of this example is to make the date and time of a personal client machine appear on the Web page through the execution of a JavaScript program. The source program is as follows: <script language= "LiveScript" ><br>&l ...

Total Pages: 21 1 .... 7 8 9 10 11 .... 21 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.