Search - Articles
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Tuesday, March 03, 2009
Dev Articles
Search Directory
ASP.NET
VB.Net
C-Sharp
SQL Server
 

FREE 12 month online training for ASP.NET & MS Expression Studio and a Free copy of MS Expression Web with Windows Server Purchase
How to make a button with Rotating Text using JavaScript in ASP.Net (Part 15)

Author: DevASP
Download Source Code : 407_Rotating_btn_text.zip

In this article you will learn that with little programming trick you can make button with rotating text button.

Write this code in head section

<script language="Javascript">

var speed = 100

var message = "Welcome DevASP Articles "

var s = 0

var l = message.length

document.write("<form name='btn'><input type='button' "

+"name='sc' value='"+ message +"'></form>")

function btnsc() {

document.btn.sc.value = message.substring(s,l) + message.substring(0,s)

s++

if (s >= l) {

s = 0

}

setTimeout("btnsc()",speed)

}

btnsc();

//-->

</script>

In this article the creation of button code is also in the head tag and you can say dynamically create button with code.

Article Comments
Thanx DevASP. It Works Very Fine...
Please Suggest Me a Book for using Javascript in ASP.Net/C# as I am a Newbie in this field...

Posted on 8/2/2009 3:07:40 AM by Aniket

It realy nice code .

Posted on 2/3/2010 6:44:06 AM by plz suggest to learn more about using Javascript

   
Add Article Comment:
Name :
Email Address :
   
Comments :
 
   
<< How to Hide your Email Address from User using JavaScript in ASP.Net (Part 14)

Disclaimer - Privacy
© 2002-2012 DevASP.net