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


No comments:

Post a Comment

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