JavaScript DHTML/Javascript Objects/String

Материал из Web эксперт
Перейти к: навигация, поиск

String.big()

   <source lang="html4strict">
 

<html> <head> <title>String formatting methods</title> </head> <body> <script type="text/javascript"> var someString = new String("This is the test string"); document.writeln(someString.big()); document.writeln(someString.blink()); document.writeln(someString.sup()); document.writeln(someString.strike()); document.writeln(someString.bold()); document.writeln(someString.italics()); document.writeln(someString.small()); document.writeln(someString.link("http://www.wbex.ru")); </script> </body> </html>


 </source>
   
  


String.blink()

   <source lang="html4strict">
 

<html> <head> <title>String formatting methods</title> </head> <body> <script type="text/javascript"> var someString = new String("This is the test string"); document.writeln(someString.big()); document.writeln(someString.blink()); document.writeln(someString.sup()); document.writeln(someString.strike()); document.writeln(someString.bold()); document.writeln(someString.italics()); document.writeln(someString.small()); document.writeln(someString.link("http://www.wbex.ru")); </script> </body> </html>


 </source>
   
  


String.bold()

   <source lang="html4strict">
 

<html> <head> <title>String formatting methods</title> </head> <body> <script type="text/javascript"> var someString = new String("This is the test string"); document.writeln(someString.big()); document.writeln(someString.blink()); document.writeln(someString.sup()); document.writeln(someString.strike()); document.writeln(someString.bold()); document.writeln(someString.italics()); document.writeln(someString.small()); document.writeln(someString.link("http://www.wbex.ru")); </script> </body> </html>


 </source>
   
  


String.concat()

   <source lang="html4strict">
 

<html> <head> <title>Exploring String</title> </head> <body> <script type="text/javascript"> var sObj = new String(); var sTxt = sObj.concat("This is a ", "new string"); document.writeln(sTxt); </script> </body> </html>


 </source>
   
  


"String" Example

   <source lang="html4strict">

   

<html> <body>

This is some sample text

<script language="javascript"> function function1(){

   var temp = new String(); temp = myDiv.innerText; alert(temp); 

} </script> <button onclick="function1();">String function</button> </body> </html>


 </source>
   
  


String.italics()

   <source lang="html4strict">
 

<html> <head> <title>String formatting methods</title> </head> <body> <script type="text/javascript"> var someString = new String("This is the test string"); document.writeln(someString.big()); document.writeln(someString.blink()); document.writeln(someString.sup()); document.writeln(someString.strike()); document.writeln(someString.bold()); document.writeln(someString.italics()); document.writeln(someString.small()); document.writeln(someString.link("http://www.wbex.ru")); </script> </body> </html>


 </source>
   
  


String.link()

   <source lang="html4strict">
 

<html> <head> <title>String formatting methods</title> </head> <body> <script type="text/javascript"> var someString = new String("This is the test string"); document.writeln(someString.big()); document.writeln(someString.blink()); document.writeln(someString.sup()); document.writeln(someString.strike()); document.writeln(someString.bold()); document.writeln(someString.italics()); document.writeln(someString.small()); document.writeln(someString.link("http://www.wbex.ru")); </script> </body> </html>


 </source>
   
  


String.small()

   <source lang="html4strict">
 

<html> <head> <title>String formatting methods</title> </head> <body> <script type="text/javascript"> var someString = new String("This is the test string"); document.writeln(someString.big()); document.writeln(someString.blink()); document.writeln(someString.sup()); document.writeln(someString.strike()); document.writeln(someString.bold()); document.writeln(someString.italics()); document.writeln(someString.small()); document.writeln(someString.link("http://www.wbex.ru")); </script> </body> </html>


 </source>
   
  


String.strike()

   <source lang="html4strict">
 

<html> <head> <title>String formatting methods</title> </head> <body> <script type="text/javascript"> var someString = new String("This is the test string"); document.writeln(someString.big()); document.writeln(someString.blink()); document.writeln(someString.sup()); document.writeln(someString.strike()); document.writeln(someString.bold()); document.writeln(someString.italics()); document.writeln(someString.small()); document.writeln(someString.link("http://www.wbex.ru")); </script> </body> </html>


 </source>
   
  


String.sup();

   <source lang="html4strict">
 

<html> <head> <title>String formatting methods</title> </head> <body> <script type="text/javascript"> var someString = new String("This is the test string"); document.writeln(someString.big()); document.writeln(someString.blink()); document.writeln(someString.sup()); document.writeln(someString.strike()); document.writeln(someString.bold()); document.writeln(someString.italics()); document.writeln(someString.small()); document.writeln(someString.link("http://www.wbex.ru")); </script> </body> </html>


 </source>