Today encountered a problem, behind the framework, when the judge login after the failure to return to the landing page, but the login page is open in the framework, I want it to jump directly out of the frame open (here is not open a new window),
Recently, the company website needs to count the data from which pages the user is entering to the registration page. Start, simply by getting in the server-side $ _server[' http_referer ' (PHP). However, found that there are a lot of registered
In web design, there may be a need to prohibit browser back buttons, especially those that are more restrictive to the user, if the user repeats the event and then back off, which can have catastrophic problems with some data. So today we're going
function ClearCookie () {
var expires = new Date ();
Expires.settime (Expires.gettime ()-1000); The current time minus one second, equivalent to immediate expiration (can increase or decrease)
document.cookie = "appcode= ' 222 '" ";p ath=/;expires="
How do I insert an element at a specific index at a JS array?
Requirements: Inserts an element into an existing array at a specific index. It sounds easy and common, but it takes a little time to study it.
The original array
var array = ["One",
For example: var student = [' Qiang ', ' Ming ', ' Tao ', ' Li ', ' Liang ', ' You ', ' Qiang ', ' Tao '];
The first idea is to iterate over the array arr to be deleted and put the elements into another array tmp, allowing the element to be placed
1. js Get page Width height and screen resolution
Page visible area wide: Document.body.clientWidth
page Visible Area High: Document.body.clientHeight
page Visible area wide: document.body.offsetWidth (including the width of the sideline)
Page
In the development test, if you choose IE, when editing a piece of data, and then go back to the editor, you will find that the data inside and not edited before is the same, and in this case, the solution of IE cache is a problem. My approach is to
An anonymous function is a function that has no actual name.
JavaScript anonymous functions are diverse, and do not understand, easy to see Halo code.
The following are the anonymous functions that were successfully invoked:
Copy Code code
Implementing the HTML interface
select and go navigation
select a topic
cross-checking fields Working With Radio buttons
setting one field with Another
validating Zip codes validating email addresses
Implementing Menu
How to determine if a field exists in the JSON data that is passed in.
1.obj["key"]!= undefined
This is flawed, and if the key is defined, and it is a 2 assignment to undefined, then the sentence will go wrong.
2.! ("key" in
You should remember how to write JavaScript inline style? (Looks like I'm talking nonsense!) )
In the front-end development process, sometimes we need to determine the browser's kernel prefix, different browsers to do different processing, so we
A function to get the nth element node, which is now only available through the HTML tag, and the function is not perfect.
Demo: HTML
1a
2b o
test
3c
4d
5e
Js:
/** * @param Parent parent node * @param ele the element label to
Sometimes, in the cause of the demand, we need to write a method in JS, and then let it execute in a moment, that is, the need to write a timer in JS, when the time to meet the required time, the need to implement the method of automatic execution,
The so-called text box flashback input is the point where the input box's focus always starts at the beginning, as shown in the figure, when I enter 123456789, the input box shows 987654321.
Why do you want to do this demo? Because it was
Use JS to upload data from one page to another layer?
If you are uploading to a new page, what language development is your site based on, get or post, and then output to this layer
Passing a URL through a parameter
If it is an HTML page, JS to
JS adds a number of styles to the element, the browser full compatibility example:
Test 3
JS adds multiple styles to an element, the quickest and easiest thing to do is to use the Csstext property, but it overrides the value of the entire
Familiar with JQ friends may occasionally use to determine whether the current browser is IE, or even specific to IE which version. For example, to determine the current browser is IE7, written as follows:
if ($.browser.msie &&
However, it is noteworthy that the official introduction has made it clear that this plug-in does not support IE6, the following will provide a multiple-instantiation of the Zero Clipboard replication function and compatible IE6!
Download
In the DOM3 has joined the Getelementsbyclassname this method, however IE9, 10 other versions are not supported, this is a piece of pain!This can be resolved so far, that the browser does not support this method, if the support does not matter, if
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