Author: Yin weiming
Blog: http://my.donews.com/yinwm/
For exampleArticleFor JavaScript, a class is a function. Its Class methods (static) are all part of this function, and the instance methods are all on prototype.Function classa (){}
How do you test regular expressions? Directly written in the big section
Code And then wait
Program Where can I run it and use alert to display the result? Or is it possible to temporarily write a page and discard it after testing?
You can try
Table Section
Code As follows:
Testtbl"Border = 1> Tr1"> Box1"> first line Tr2"> Box2"> Row 2 Box3"> Row 3 Dynamically add table rowsJavascriptThe function is as follows: Function addrow (){ //Add a row VaR
Today's development involves information control on a layer, that is, to control what information is displayed in a layer, to find information to know how to use the innerhtml attribute to control the layer value, this innerhtml is similar to the
When performing a Sino-English conversion, you must obtain and retrieve the parameters accurately. Therefore, you have made a simple HTML file and used JavaScript to obtain an object in the address bar.
There are three methods:
1. Request.
! Remove spaces at both ends of a string
If you use the traditional method, you may need to use the following method.// Clear spaces on the leftFunction js_ltrim (deststr){If (deststr = NULL) Return "";VaR Pos = 0;VaR retstr = new string
Onblur: (used in form elements, when the element loses focus)
Onchange :( used in form elements, when something changes, it is executed)
Onclick: (execute when you click an element)
Ondblclick: (double-click an element)
Onfocus: (used in form
In flash, we can add some simple scripts on the mask to implement a dynamic image magnifier. Now we can easily make this effect by combining JavaScript with the CSS language.
Production ideas: There is a background image behind the magnifier,
In the search engine's robot search, the "text" such as type, text, and HTML have the highest degree of friendliness (except for text/XML at present ), the friendliness of text and JavaScript is not ideal. If robot needs to judge DHTML
Code The
CopyCode The Code is as follows: function xmlwriter ()
{
This. xml = [];
This. nodes = [];
This. State = "";
This. formatxml = function (STR)
{
If (STR)
Return Str. replace (// G ,"&"). replace (/\ "/g ,"""). replace (//g, "> ");
Return ""
}
This.
(The following questions are only raised for Javascript. Please note that if you have any questions, just smile)
1. What is static or pseudo-static?
2. What is the syntax for writing static classes in javsscript? (Including arrays, constants, and so
CopyCode The Code is as follows:
The filesize attribute of JavaScript and IMG in IE is applied. In addition, IMG has several other attributes, such as filecreateddate, filemodifieddate, filesize, fileupdateddate, and filters. We can use
A very good javascript class
Copy codeThe Code is as follows :/*
* Author: aoao
* Homepage: http://www.loaoao.com
* Email: loaoao@gmail.com/QQ: 2222342
* Copyright (c) 2006 aoao
* Licensed under a Creative Commons Attribution 2.5 License
Copy codeThe Code is as follows :/**
* Get the set object of the XML file attributes.
* @ Param xmlDoc XML Object
* @ Param name attribute name, for example, user
* @ Return returns an Array object.
* Example XML:
*
*
*
*
* pig
*
* 27
*
*
This is not a very complex coding tool, which can be directly recognized by the browser After encoding. Sina is in use.
For example: http://comment4.news.sina.com.cn/comment/cmnt_xml.js
Go to http://dean.edwards.name/packer/, which is simple.
Preface: Although there is nothing technically involved in implementing menu commands using js, this is quite complete.
When we see links on other people's web pages that enable, print, forward, save as, back, close this window, disable right-click,
Document directory
Demo-Drag and Drop any item
Demo-Drag and Drop any item
Demo-Drag any of the images
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
You will notice that this
Javascript: Use div to simulate javascript modal window. Javascript tutorial
Although it has nothing to do with the content of this blog, I 'd like to write it out and hope it will help you.A few days ago, I saw someone in my blog saying that the
JavaScript: three types of JavaScript representation of the bubble algorithm.
I used to learn the bubble algorithm, but I was confused about the relationship between some variables such as n and n-1, because I didn't understand the true meaning of
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