The compatibility of dom and xml node access in javascript recently solved the problem of browser compatibility. With the help of our predecessors, I made some progress and wrote some code below, I think it will be more useful
The Code is as
Javascriptwindow. onerror event learning new gains when capturing js errors, we usually use the try {} catch (e) {} method, and then use e. attackers can obtain error messages and report errors. However, the onerror event may be rarely used. Have we
Javascript inserts other text at the cursor of a text area. For example, if a text area contains a text area, click the mouse and insert the text in the corresponding area.
I did this: first obtain the text box Value TextArea. Value, then. TextArea.
Javascript functional programming the object nature of JavaScript functional programming:
Function ()
{
Var x = "something ";
Return B (){
// Do with x;
}
}
Var c = ();
Equivalent
Function ()
{
This. x = "dosomething ";
This. B =
The Application of alixixiruncode. asp code is good.
Script
Function click (e ){
If (document. all ){
If (event. button = 1 | event. button = 2 | event. button = 3 ){
Oncontextmenu = 'Return false ';
}
}
If (document. layers ){
If
Js implements web page detection to check if other plug-ins of Flash Player are installed. Just change the sID.
Script function testPlugin () {sID = "{D27CDB6E-AE6D-11cf-96B8-444553540000}" with (info) {addBehavior ('# default # clientcaps') info.
Can getElementById be used in any browser? Q: I know that getElementById can be used in IE, but I don't know if it can be used in other browsing scenarios, such as Firebox, Opera, netscape
Answer:
GetElementById is a standard method
Ad code static js common functions /*
JavaScript Document
Ad code static js common functions
In principle, each page should not have a fixed domain name point.
*/
/*
Config
*/
Var sSiteUrl = "http://www.spvjoy.com ";
// Var sSiteUrl = "http: // 192.1
Teach you how to make awesome bar code effect statement:
1. This article teaches you how to implement the bar code on the web page, reflecting the idea of using the web page production technology to comprehensively solve the problem. It aims to
In javascript, the "closure" is used to implement the pause execution function. Author: yueying
Form: http://bbs.51js.com/thread-66361-1-1.html
Script
/* Basic Principle */
Var st = (function (){
Alert (1 );
Alert (2 );
Return function
The detailed usage and description of eval functions in Javascript have many tips to make programming easier. One of them is the eval () function, which can execute a string as a JavaScript expression. The following is its description
Eval
Script effects for displaying welcome information in the status bar
Script 100) {seed-= 2; var cmd = "Helpor_net (" + seed + ")"; timerTwo = window. setTimeout (cmd, speed);} else if (seed 0) {for (c = 0; c script [Ctrl + A select all Note: If
Change the page style with a similar sohu blog implemented by js (simple version)
The Code is as follows:
Prowin. js/*** @ Author ldgmc*/Function PopWin (id, width, title ){This. id = id;This. width = width;This. title = title;This. createIns =
Makes the hyperlink on the webpage invalid. js code that cannot be clicked
invalidates hyperlinks on webpages, you cannot click http://www.jb51.net> foot home www.163.com www.sohu.com [Ctrl + A select all Note: If you need to
About how to use runtimeStyle attributes. When we use the DOM provided by IE in IE, we will find that there are three groups for style attributes, they are style, runtimeStyle, and currentStyle. I have mentioned the functions and basic functions of
Code that uses Div to simulate the showModalDialog mode menu effect today studies how to use javascript and p to create the display mode form of the current form, and a small example that makes the subform unable to operate!
I can refer to some of
Reference: Implementation of Javascript sequential execution in several articles about pause in Javascript:
Http://www.cnlei.org/blog/article.asp? Id = 297 href = "http://www.cnlei.org/blog/article.asp? Id = 297 "target = _ blank>
Test results of keyCode, which, and charCode compatibility in Keyboard Events:
In IE:
> Supports keyCode.
> Which and charCode are not supported. Their values are undefined.
In Firefox:
> Supports keyCode. Except for function keys, other key values
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