Você está na página 1de 1

Topics in JavaScript we used till now in our applications:

Concept Purpose Reference


For All Basics Brows w3schools.com
1. DOM(Document Object Model) To retrieve the data from xml or html. Wrox-Professional JavaScript for WebDevolopers-
2005.pdf
(pageNo:159 & 303)
2. Tables or Data grids Sorting and data capturing the nodes for Wrox-Professional JavaScript for WebDevolopers-
the report generation. 2005.pdf
(pageNo:367)
3. Dynamic Table Building For reports viewing in the browser. JavaScript Programmers Referance.pdf
(pageNo:50)
4. Drag and Drop Used for User Interface and efficient Wrox-Professional JavaScript for WebDevolopers-
presentation layer. 2005.pdf
(pageNo:388)
5. Capture HTML Elements For Getting all types elements based on JavaScript Programmers Referance.pdf
the type in a document. (pageNo:8)
6. XML For using xml in JavaScript. Used while Wrox-Professional JavaScript for WebDevolopers-
Ajax xml retrieval 2005.pdf
(pageNo:445)
7. Date picker For Date picker field use our date picker Datepicker.html
For Task Wise Learning Follow the Book “John Wiley & Sons - JavaScript in 10 Steps or Less. PDF”

-: String Capturing :-

General String Methods


Name Example Input Output Notes
length s.length 5 There are no parentheses. The last index is one less than the length. This cannot be use
charAt() s.charAt(1) e If out of bounds, returns an undefined empty string.
slice() s.slice(0,2) He Returns substring from the first index until the character BEFORE the second index. Gi
s.slice(2) llo
substr() s.substr(2,2) ll Returns the second argument number of characters beginning at the first argument. Give
s.substr(2) llo
toLowerCase() s.toLowerCase() hello Returns the changed version but does not change the string itself.
toUpperCase() s.toUpperCase() HELLO
indexOf() s.indexOf(“l”) 2 Returns the first index of the given substring, or –1 if not found. It is case-sensitive.
s.indexOf(“ll”) 2
lastIndexOf() s.lastIndexOf(“l”) 3 Same as indexOf except it returns the last index.
split() s.split(“”) [H,e,l,l,o] Uses the argument to divide the string into an array form.
“ab,ac”.split(“,”) [ab,ac]
charCodeAt() s.CharCodeAt(0) 72 Returns the ASCII character code value

Methods Returning an HTML-formatted Version of a String


Name Example Input Appearance in HTML Actual Output
bold() s.bold() Hello <B>Hello</B>
italics() s.italics() <I>Hello</I>

Hello
fixed() s.fixed() Hello <TT>Hello</TT>
sub() s.sub() Hello <SUB>Hello</SUB>
sup() s.sup() Hello <SUP>Hello</SUP>
fontcolor() s.fontcolor(“red”) <FONT COLOR=“red”>Hello</FONT>
s.fontcolor(“ff0000”) <FONT COLOR=“ff0000”)Hello</FONT>
fontsize() s.fontsize(1) Hello <FONT SIZE=“1”>Hello</FONT>
s.fontsize(7) a big Hello <FONT SIZE=“7”)Hello</FONT>
link() s.link(“www.edu”) Hello <A HREF=”www.edu”>Hello</A>

fromCharCode() String.fromCharCode(65) A Makes a string from the ASCII values. Note it is not used on individual strings, bu
String.fromCharCode(65,66) AB

Você também pode gostar