JavaScript String functions
sponsored ads
<title>Javascript Example</title>
function draw(opt)

 var st=new String("Tutorials by Kashid");

          switch (opt)
             case 1:st=st.big();
             case 2:st=st.small();
             case 3:st=st.strike();

    case 4:st=st.bold();
             case 5:st=st.italics();
             case 6:st=st.toLowerCase();

             case 7:st=st.toUpperCase();





<body bgcolor='#cccfaa'>
<div id='div1'>Tutorials by Kashid</div>
<input type=radio name=r1 onclick="draw(1);"/>Big<br/>
<input type=radio name=r1 onclick="draw(2);" />Small<br/>
<input type=radio name=r1 onclick="draw(3);" />Strike<br/>
<input type=radio name=r1 onclick="draw(4);" />Bold<br/>
<input type=radio name=r1 onclick="draw(5);" />Italics<br/>
<input type=radio name=r1 onclick="draw(6);" />Lcase<br/>
<input type=radio name=r1 onclick="draw(7);" />Ucase<br/>
Font Color:<input type=radio name=r2 onclick="'green'" />Green
<input type=radio name=r2 onclick="'#FF6600'" />Orange


1 comment:

  1. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Front end developer learn from Javascript Training in Chennai . or learn thru JavaScript Online Training in India. Nowadays JavaScript has tons of job opportunities on various vertical industry. JavaScript Training in Chennai


Thanks for visiting my Blog!

Have a Question ? Need Help in College Assignments, Need Code that is not available here? Just leave a comment & get your code instantly.

Tips to Enhance Your Blog