Webmaster Common JavaScript scripting code

1. always with the frame 9. prevent a person from being frame Web pages will not be saved as Look at the Web page source code onclick= "window.location =" View-source: "+" http://www.pconline.com.cn "" > Confirmation at deletion Delete

JavaScript connection opens code in IFRAME

Sometimes we use the framework to make a new page open in the IFRAME, and look at the detailed code below.

JavaScript judgment characters appear in the character code

In JS we have to judge that a string appears in another string, using IndexOf to look at its syntax Stringobject.indexof (Searchvalue,fromindex) ParametersStrobjRequired option. A string object or text.SubstringRequired option. The substring to

JavaScript LastIndexOf determines where the string appears last

LastIndexOf Method: Returns the last occurrence of the substring of a string object. Stringobject.lastindexof (Searchvalue,fromindex)ParametersStrobjRequired option. A string object or text.SubstringRequired option. The substring to find within

About JavaScript in IE Firefox compatibility details (1/4)

* Following IE instead of Internet Explorer to Mf/ff instead of Mozzila Firefox/ Window.eventie: there are window.event objectsFF: no Window.event object. You can pass an event object to a parameter of a function. such as

JavaScript determines that the current page has the specified ID

sitemap teacher column Original articles reproduced in this site is indicated from http://www.111cn.net/js_a/js.html otherwise must investigate

Javascript Document object and detailed description

Object Properties Document.title//Set document title equivalent to HTML title tagDocument.bgcolor//Set page background colorDocument.fgcolor//Set foreground colors (text color)Document.linkcolor//not-clicked link colorDocument.alinkcolor//Activate

JavaScript version of the Quine program

Quote from Wikipedia: A quine is a computer program, it does not accept any input, and the only output is its own source code. @cowboy (Ben Alman) gives a quine program written in javascript:!function $ () {Console.log ('! ') +$+ ' () ')}

JavaScript Arithmetic Precision Loss Solution

pow

Reproduced in: http://jiangzhengjun.iteye.com/blog/458869JavaScript decimal When doing arithmetic, the accuracy will be lost, this will cause a lot of inconvenience in the project, first see the following script: According to the normal calculation,

[Javascript] Javascript ' in ' Opreator

If you want to check whether a key was inside an Object or Array, you can use the ' in ':Object:const obj = { 'graphql', false}; Console.log ('name'in// trueconsole.log ( ' title ' inch // falseArray:ConstCharacters = [ 'Harry Potter', 'Ron

"Hight Performance Javascript"--script loading and running

Script Loading and runningWhen a browser encounters a the defer property indicates that the script contained in the element does not intend to modify the DOM, so the code can be executed later. The corresponding JavaScript file will "Hight

Native JavaScript implements JSONP encapsulation

JSONP is the JSON with Padding. Due to the limitations of the same-origin policy, XMLHttpRequest only allows resources to be requested for the current source (domain name, protocol, port). If cross-domain requests are made, we can make cross-domain

HTML & lt; dl & gt; tag, htmldl tag

HTML tag and htmldl tag A definition list: Computer the instrument used for calculation... display devices that display information visually...   Effect:A definition list: Computer The instrument used for calculation ......

HTML target and htmltarget

HTML target and htmltargetDefinition and usage the target attribute of a tag specifies where to open the link document. If a tag contains a target attribute, the browser loads and displays the documents in the framework or window named by the href

Div, span, divspan

Div, span, divspan 1. Html block elements HTML can combine elements through and Most HTML elements are definedBlock-level elementsOrInline Element, When a block-level element is displayed in a browser, it usually starts (or ends) with a new line ).

JavaScript restricts that only one page of the same website can be opened in the same browser.

Tip: you can modify some code before running Tip: you can modify some code before running

Javascript window. open, moveTo, resizeTo function tutorial

Tip: you can modify some code before running Go to the JavaScript website Tip: you can modify some code before running

JavaScript multi-line text box that can be stretched/shortened

Tip: you can modify some code before running Multi-row text box that can be stretched/shortened与之间-->与之间--> Tip: you can modify some code before running

JavaScript code for controlling image rotation effect

Tip: you can modify some code before running Filter effect: Tip: you can modify some code before running

Javascript + div pop-up Layer Code

Tip: you can modify some code before running Javascript + div pop-up Layer CodeDear user:×1. The first Chinese WEB station provides you with professional knowledgeThe first stop of Chinese WEB will provide you with professional knowledgeThe first

Total Pages: 5378 1 .... 3467 3468 3469 3470 3471 .... 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.