CopyCode The Code is as follows: /*************************************** ***************
// * Function Description: Write the password input control to the page.
// * Parameter description:
// Inputctlname: name of the original control
//
//
Mainly used JS
Code
Copy code The Code is as follows: function getselectedtext (){
VaR selectedtext;
VaR textfield = Document. getelementbyid ('inputtextarea ');
If (window. getselection) selectedtext = gettextfieldselection (textfield); //
Ttp: // www.w3.org/tr/html4/strict.dtd "target =" _ blank "> http://www.w3.org/TR/html4/strict.dtd"> final example with JavaScript applied. hover over a table cell to see effects. "View Source" and copy if you 'd like to use. Rolling
Now, let's move it to the body. We will introduce several function functions before getting started!
1. functions used to format events
CopyCode The Code is as follows: function getevent (){
// Compatible with both IE and FF
If (document. All)
Xmlns = "http://www.w3.org/1999/xhtml">
Demo of the new website-lib Function Application
12345678
Drag a window (1)
Close Window
Ricoh R series is fully known for its own use. Last year, R7 was a well-developed product,
ArticleDirectory
JS formatting time_script home
CopyCode The Code is as follows: function dateutil () {}/*** function: Format time * example: dateutil. format ("yyyy/mm/DD", "Thu Nov 9 20:30:37 UTC + 0800 2006"); * return value: 2
But it is an XML string, it will be different in the two browsers. in IE, you can directly use the loadxml method to parse the XML string, and in FF, you need to use the parsefromstring () of the domparser object () the method is
VaR oparser = new
// Obtain the character array
String. Prototype. tochararray = function ()
{
Return this. Split ("");
}
// Obtain n identical strings
String. Prototype. Repeat = function (Num)
{
VaR tmparr = [];
For (VAR I = 0; I Return tmparr. Join ("");
}
//
Error object
Property:Name: Error nameNumber: error numberDescription: DescriptionMessage: error message, which is the same as description.FF only attributeFilename: The file where the error occurs.STACK: Call Stack when an error occurs
Recently, you need to export data to word and edit and print the data.I have thought of several solutions:1. Use Jacob.2. Use Apache poi.3. Use itext.Because of the tight schedule, I have to study the above toolkit in a few cases. Now I use
1) how to create an object:
1. Use constructor, for example:
VaR OBJ = new object () // VaR can be omitted
VaR OBJ = new date ()
2. Use object literals ),For example:
ProgramCode
VaR OBJ = "123" // create a String objectVaR OBJ =/^ ABC $
It's hard. Prepare yourself ...... Take a deep breath...
1, for/in:A Method for Traversing (enumerative) object attributes can loop through attributes we do not know beforehand.It can enumerate all user-defined attributes, but cannot enumerate
First look at html
Code :
maximum text length: 250. Remaining: 250 . It can be seen that onkeyup is an event triggered when the user leaves the keyboard. The parameter passed is this (that is, the current document area)
Then let's take a
Learning English:
DOM: Document Object Model. Document Object Model
Bom: browser object model.
Note: It can also be called the window object model. (Window object model .)
API: Application Programming Interface.
Note: Dom can be viewed as an
Start with the method:
1. delete a node. Removechild ():
A
B
C
If you do not know the parent node of the node to be deleted? You can use the parentnode attribute.
For example:
A
B
C
2. Replace the node. Repalcechild
Step 1: Analizing the problem)
To create a good script, the first step should be to analyze what you want to do: we want to create a slide effect for a photo, and we want to maintain it conveniently.
How to Create a slide
There are several ways to
What new students often learn ~
// prompt
// prompt
// read system time
www.winshell.cn // click to connect to the js running display time
// click Submit to display the js running time.
********************** For loop ************** **********
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