IFRAME Many sites are in use, although convenient development and maintenance (may also have several pages call the same IFRAME), but there are security issues. Embedded in the IFRAME page, both the parent page and the subpage can be easily read and
JS clicks a button, pops a layer, and obscures the content behind the page to make it translucent. This effect used a lot of, such as forum Landing, check-in when the pop-up layer, such as the current popular micro-letter sweep, click a button when
Reload method that forces the browser to refresh the current page.
Syntax: Location.reload ([bforceget]) parameter: bforceget, optional parameter, default to False, take current page from client cache. True to get the latest page from the service,
code is as follows
copy code
//Based on time Chou function Return date (2013-10-10); Function Getlocaltime (ns) { var d = new Date (parseint (NS)). toLocaleDateString (). Replace (/[^ D]/g, ' _ '). Split ('_'); var
Method One: Function construction definition method returns
The code is as follows
Copy Code
var Strjson = "{name: ' JSON name '}";//Get JSONvar obj = new Function ("return" + Strjson) ()//converted JSON objectalert (obj.
Example 1
The code is as follows
Copy Code
var myForm = document.createelement ("form");Myform.method= "Get";Myform.action = "line_ticket.aspx";var myinput = document.createelement ("input");Myinput.setattribute ("name",
The most basic syntax for accessing a given CSS value is: Object.style.property, such as: Object.style.backgroundcolor= "#ccc"; However, if you access the Float property, it is not the same, because float itself is the reserved keyword JS, you need
Usually our website will load some JS code, statistics ah, Google ads Ah, Baidu Alliance Ah, Ali mother Advertising code Ah, a heap, finally make the page loading speed is very slow, very slow.Solution: Change the way a JS contains, so that the
Many WEB developers are likely to encounter this headache, that is, when the user to reduce or enlarge the page, the original good layout is destroyed. It is a big challenge for developers to allow web pages to support adaptive scaling and zooming
There are two ways to use regular expressions in JavaScript. The first is to build a RegExp object, and the second is to use "//" to define the Perl style. For example:
The code is as follows
Copy Code
var str = ' http://
Example 1
Get the version number of each browser, if you need to get a specific version number
The code is as follows
Copy Code
function Flashchecker () {var hasflash = 0; Whether Flash is installedvar flashversion = 0;
The code is as follows
Copy Code
Function Name: FucchecknumFeature Description: Check for numbersParameter description: The number to checkReturn value: 1 is a number, 0 is not a number
The code is as follows
/** function: Intercepting long strings* @param {string} str to intercept* @param {number} size intercept length (single byte length)*/
The code is as follows
Copy Code
var subStr = function (str, size) {var cursize = 0,
Funobj.apply ([Thisobj[,argarray]])
Applies a method of an object, replacing the current object with another object.
When the Functionobj method executes, the This object in the function is replaced by the thisobj.
Thisobj can be selected. The
When the div is clicked, the pop-up box displays undefined.The reason is that when a DOM object responds to a click event, the This keyword in the event method points to a DOM object, and the DOM object does not have a property, so it pops up the
IE6 security... Hmm, let's start a command shell... This page doesn't do anything malicious, but is a demonstration of how to execute a program on a remote machine usingMarvelously secure Internet Explorer web browser !!Up until at least 18/02/02,
cursor position Click TextArea to locate the cursor I am afraid I will hold you, until you feel your crepe has traces of time, until your sight gets blurred until you cannot breatheI wantYou can't touch or look at you, until you feel that your
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