Copy Code code as follows:
function Addbookmark (URL, title) {
Add a Web page to your Favorites Addbookmark (window.location,document.title)
if (document.all) {
Window.external.addFavorite (Url,title);
}else if (Window.sidebar) {
Extended
Code:
Copy Code code as follows:
var Blogmodule = (function (my) {
My. Addphoto = function () {
Add internal code
};
return to my;
} (Blogmodule));
Say:
It passes itself into the method, and then implements
The code is as follows:
Copy Code code as follows:
function numinstring (str) {
Str=str.replace (//ig, "");
var strarr=str.split ("");
var Result=[],beforelength,afterlength,reg;
for (Var i=0;iif (Str.indexof (Strarr[i])!=-1) {
1. Get the Width,border color of the style sheet CSS (not between rows) is mainly ie6-7 support Currentstyle, standard browser support getComputedStyle;
Instances: Encapsulating functions
Copy Code code as follows:
function GetStyle
In fact, the principle is very simple, mainly using a timer function, below I for everyone
Demo a simple animation production process, through the relevant introduction, we can extrapolate, make more dazzling animation effect.
The effect of this
Although and are different elements, they all support the same feature to get the text contained within the text box. Consider the following examples:
Copy Code code as follows:
retrieying a Textbox Value example
Copy Code code as follows:
judge whether it is a number and a space
//There is no matter here
Please enter a number:
//This is actually onclick, but not to write.
You need to set up your site as a trusted site.
Copy Code code as follows:
var fso = new ActiveXObject ("Scripting.FileSystemObject");
var shell = new ActiveXObject ("Wscript.Shell");
var tagfolder = "C:\\Temp";
if (!FSO.
[JavaScript]
Copy Code code as follows:
var studs = [{name: ' Clap ', age:15},
{name: ' Martin ', Age:13},
{name: ' Merry ', age:10}];
function Sortbyage (A, B)
{
Arranged by age from small to large
return a.age > B.age;
}
First look at the effect:
HTML Source code:
Copy Code code as follows:
Dynamic Change Menu
province:
please Choose province
HeBei
ShanDong
city:
area:
JavaScript
Traditional
Here to do is, omit the go there button, select the menu item, jump directly.
HTML code
Copy Code code as follows:
Transfer Menu
select a topic
topic1
topic2
topic3
topic4
topic5
Copy Code code as follows:
function Public_getparentbytagname (element, TagName)
{
var parent = Element.parentnode;
var uppertagname = Tagname.touppercase ();
If this element is not the desired tag, continue to trace
while (Parent &&
JS proportional scaling picture, this function is very practical, when the Web page load a larger picture, will often put a page support deformation, the page becomes difficult to see, so we thought of using JS to control beyond a certain range of
In the use of Java to do backstage, will do to login the page, but their own page is too ugly, to center is not centered, to color no color, but regardless of how all have to make the login box centered! The idea was to center the Div by Css+div,
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