1. Add dynamic load CSS file does not need to introduce CSS CSS all generated dynamically in JS.2. Do not need additional tags only need an input box and the default specifies a class class named "Inputelem" of course, you can also configure the
Web page Select Local Directory Path dialog box, use ActiveX objects to traverse Local disk and directory, only the Web page to enable the relevant ActiveX Internet options, the local browser security requirements are not high, simple and
In the server-side file upload process, if the use of the Web server to upload the short end of the file, will cause the page to refresh once, so the user experience is not very friendly. Ajaxfileupload.js is a jquery asynchronous upload file
Recently opened Sina scarf, whim, want to do a browser plug-in to achieve text news, such as the forwarding of the plug. This thought should use C + + to write a plug-in (C # so big Shell sometimes really let a person headache), but Google a bit,
Customer requirements for the first few rows of table data or the first few columns to freeze, that is, when scrolling to keep these rows/columns do not move, through the Internet to find code, reference to the idea of existing code, to achieve any
How to use:
Copy Code code as follows:
Str.substring (start, end)
"String Literal". Substring (start, end)
Where "Start" indicates the starting position of the string to intercept, starting at 0.
"End" indicates the ending
js block bubbling
In the process of blocking bubbles, the different methods used by the consortium and IE, then we have to do the following compatibility.
Copy Code code as follows:
function Stoppro (evt) {
var e = evt | |
In the first study of jquery, it is often impossible to distinguish between DOM objects and jquery objects, so let's take a brief look at the relationships and differences between them.
1.DOM Object (Document object Model)
Document Object model,
Copy Code code as follows:
function Flashchecker () {
var hasflash = 0; Whether Flash is installed
var flashversion = 0; Flash version
if (document.all) {
var swf = new ActiveXObject (' Shockwaveflash.shockwaveflash ');
if (SWF) {
Parentelement gets the parent object in the object hierarchy.ParentNode gets the parent object in the document hierarchy.ChildNodes gets a collection of HTML elements and Textnode objects that are direct descendants of the specified object.Children
One: what is SVG
SVG is a 1999 2D graphic description Language published by the consortium, a purely XML-based markup language, SVG
The full name is a large difference between scalable vector graphics and traditional raster graphics (JPG, PNG, GIF,
The Javascript action Select is a common form in forms, and the following are some of the most commonly used methods of JS dynamic operation select:
Copy Code code as follows:
Create a Select dynamically
function Createselect ()
{
JavaScript math.random () built-in functions
Random function return value
Returns the pseudo-random number between 0 and 1, possibly 0, but always less than 1,[0,1
Random Function Example
return random number
document.write (Math.random
1. If there are attributes in the JSON object that contain double quotes, such as
Copy Code code as follows:
{
"description": "25" "
}
If converted to a string form, the backslash is automatically added to "25\" and then
wrote a str = "s" + +;
Then there was Nan, and for a while.
The information collected is as follows:
1. Judge undefined:
Copy Code code as follows:
var tmp = undefined;
if (typeof (tmp) = = "undefined") {
Alert ("undefined");
}
has collated a variety of page jump method referrer lost situation, which mentioned, in IE, using similar location.href = "a.html" in such a way to jump the page, in the target page Document.referrer value will be empty. This should be a bug for IE.
The tbody innerHTML in IE6-IE9 cannot be assigned a value and the following code is reproduced
Copy Code code as follows:
Tbody innerHTML cannot be duplicated in IE6-IE9 bug
aaa
getSET
Copy Code code as follows:
(function () {
var calc = {
/*
function, addition function, used to get the exact addition result
Description: JavaScript addition results will be error, in two floating-point number added when it is more obvious.
Write at the beginning: In fact, I was thinking about whether to write this thing, because this thing is not difficult, but why there are so many people ask, they are not asking how to use the console, but do not know what the console can do, they
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