• Image 1
  • Image 2
  • Image 3
  • Image 4
  • Image 5
  • Image 6
  • Image 7




Friday, July 6, 2012

TUTORIAL JAVASCRIPT - STRING FOR NEWBIE

Hii... Welcome in my site..
Exactlly in "We Are Knowledge"...
This time I want giving you tutorial javascript about "string"
Ok.. Check it ...


In Javascript to be found more form string..
1. Length
2. Insert
3. Delete
4. And other


A. Formating Text With Javascript
For help you in formatting text way programming, javascript was present more method formatting using javascript.


Method
Define
Anchor()
To result string with between taq <a name = “name”
Big()
To result with between tag <BIG>
Blink()
To result string with blink
Bold()
To result string with word bold
Fixed
To result string with between taq <TT>`
Fontcolor()
To result color for string, red, green, and other
Fontsize()
To result size of font ex: 12px, 14px
Italics()
To result with font italic
Link(url)
To result word or character having web address
Small()
To result string with between tag <small>
Strike()
To result string with between tag <strike>
Sub()
To result string with between tag <sub>
Sup()
To result string with between tag <sup>
toLowerCase()
Change all string become lower case letters
toUpperCase()
Change all string become capital letter




















Example 1 :

<html>
<head>We Are Knowledge<br>
<title>Tutorial Javascript - String</title>
</head>
<body>
<script>
var a = "We Are Knowledge"
long_text = a.length;
alert(long_text);
</script>
</body>
</html>

Result : 
Want to appear alert and count of character


Example 2 :

<html>
<head>We Are Knowledge<br><br>
<title>Tutorial Javascript - String</title>
</head>
<body>
<script>
var a = "have-fun-and-enjoy.blogspot.com"
document.write(a);
</script>
</body>
</html>

Result :
Want to appear in web page sentence "have-fun-and-enjoy.blogspot.com"


Example 3:

<html>
<head>We Are Knowledge<br><br>
<title>Tutorial Javascript - String</title>
</head>
<body>
<script>
var a = "have-fun-and-enjoy.blogspot.com"
document.write(a.toUpperCase());
</script>
</body>
</html>

Result :
Want to appear in web page sentence "have-fun-and-enjoy.blogspot.com" but with "kapital letter"


Example 4:

<html>
<head>We Are Knowledge<br><br>
<title>Tutorial Javascript - String</title>
</head>
<body>
<script>
var a = "HAVE-FUN-AND-ENJOY.BLOGSPOT.COM"
document.write(a.toLowerCase());
</script>
</body>
</html>

Result :
Want to appear in web page sentence "have-fun-and-enjoy.blogspot.com" but with "lower case letters"


Example 5:
<html>
<head>We Are Knowledge<br><br>
<title>Tutorial Javascript - String</title>
</head>
<body>
<script>
var a = "HAVE-FUN-AND-ENJOY.BLOGSPOT.COM"
document.write(a.toLowerCase().bold().italics());
</script>
</body>
</html>

Result :
Want to appear in web page sentence "have-fun-and-enjoy.blogspot.com" but with "lower case letters, Bold sentence, and italic".




Ok Thank was visit and read in my page..
read too my other article about other javascript..
Thanks for you

No comments:

Post a Comment