»
Tiếng AnhTiếng PhápTiếng Việt

In - Chữ chạy trong nút bấm - JavaScriptBank.com

Phiên bản đầy đủ: jsB@nk » Biểu mẫu » Nút nhấn » Chữ chạy trong nút bấm
URL: https://www.javascriptbank.com/dynamic-button.html

Chữ chạy trong nút bấm © JavaScriptBank.comĐoạn mã này làm cho chữ của nút bấm tự động di chuyển từ phải sang trái đồng thời kích thước của nút cũng thay đổi liên tục.

Phiên bản đầy đủ: jsB@nk » Biểu mẫu » Nút nhấn » Chữ chạy trong nút bấm
URL: https://www.javascriptbank.com/dynamic-button.html



JavaScript
<SCRIPT language=JavaScript><!-- Created in part by: Nate - natedawg_rhs_2000@yahoo.com// I don't take all the credit for this script, as I only made part of it.................var id,pause=0,position=0;function banner() {        // variables declaration        var i,k,msg="........JavaScriptBank.com ........ over 2000+ free JavaScript";        // increase msg        k=(60/msg.length)+1;        for(i=0;i<=k;i++) msg+=" "+msg;        // show it to the window        document.form2.banner.value=msg.substring(position,position+60);        // set new position        if(position++==msg.length) position=0;        // repeat at entered speed         id=setTimeout("banner()",150); }// end -->banner();</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<FORM name=form2><INPUT name=banner onclick="parent.location='mailto:your_email@your_domain.com?subject=Questions, Comments, Etc.'" type=submit value="Questions, Comments, Suggestions?  Click Here To E-mail Me!"> </FORM><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->