1. Add to favorites
HTML code
<script Language="Javascript">
function bookmarkit()
{
window.external.addFavorite('<a href="http://" target="_blank" rel="external">http://</a>your URL','your website name')
}
if (document.all)document.write('<a href="#" onClick="bookmarkit()">Add to favorites</a>')
</script>
[Ctrl+A Select All Tips: You can modify part of the code first and then press Run]
2. Make hyperlinks not display underlined
HTML code
<style type="text/css">
<!-
a:link{text-decoration:none}
a:hover{text-decoration:none}
a:visited{text-decoration:none}
->
</style>
[Ctrl+A Select All Tips: You can modify part of the code first and then press Run]
3.
HTML codethat disables the right mouse button action
<script Language = "Javascript">
function click() { if (event.button==2||event.button==3)
{
alert('Disable right mouse button');
}
document.onmousedown=click // -->
</script>
[Ctrl+A Select All Tips: You can modify part of the code first and then press Run]
4. Set this page as the home page
HTML code <body bgcolor="#FFFFFF" text="#000000">
<!-- Your URL:<a href=" http://www.code-123.com/wlbc/asp/list_1.html --" target="_blank" rel="external">http:// www.code-123.com/wlbc/asp/list_1.html--</a>>
<a style="cursor:hand" HREF
onClick="this.style.behavior='url(#default#homepage)';
this.setHomePage('your website name);"><font color="000000" size="2" face="宋体">Set as homepage</font></a>
</body> </TEXTAREA><br/><INPUT onclick="runEx('temp99357')" type="button" class="userbutton" value="Run this code"/> <INPUT onclick="doCopy( 'temp99357')" type="button" class="userbutton" value="Copy this code"/> <INPUT onclick="saveCode('temp99357')" type="button" class="userbutton" value="Save This code">[Ctrl+A select all tips: You can modify part of the code first and then press run]</div></div><br/><br/>5. Let the text scroll <br/><br/><div class="UBBPanel"><EM onClick="copycode(code86103);">Copy content to clipboard</EM><H5> <img src="images/code.gif" style="margin:0px 2px -3px 0px;border:0" alt="Program code"/>Program code</H5><div class="UBBContent" id=code86103 > <MARQUEE>Scroll text</MARQUEE> </div></div> <br/><br/>6. Record and display the last modification time of the web page <br/><br/><div class="UBBPanel"><EM onClick="copycode(code77817);">Copy content to clipboard</EM>< H5><img src="images/code.gif" style="margin:0px 2px -3px 0px;border:0" alt="Program code"/>Program code</H5><div class="UBBContent" id =code77817> <script language=Javascript> <br/> document.write("Last updated: " + document.lastModified + "") <br /> </script> </div></div> <br/><br/>7. Close the current window <br/><br/><div class="UBBPanel"><EM onClick="copycode(code55791);">Copy content to clipboard</EM><H5><img src ="images/code.gif" style="margin:0px 2px -3px 0px;border:0" alt="Program code"/>Program code</H5><div class="UBBContent" id=code55791>< a href="/"onClick="javascript:window.close();return false;">Close window</a> </div></div><br/><br/> 8. Close the current page after 5 seconds <br/><br/><div class="UBBPanel"><div class="UBBTitle"><img src="images/html.gif" style=" margin:0px 2px -3px 0px">HTML code</div><div class="UBBContent"><TEXTAREA rows="8" id="temp66245"><script language="Javascript">
<!--
setTimeout('window.close();',5000);
-->
</script>
[Ctrl+A All selection tips: You can modify part of the code first, then click Run]
the HTML code
of the specified web page after 2 seconds
<head>
<meta http-equiv="refresh" content="2;URL=http://your URL">
</head>
[Ctrl+A Select All Tips: You can modify part of the code first and then press Run]
10. Holiday countdown
HTML code
<script Language="Javascript">
var timedate= new Date("December 25,2003");
var times="Christmas";
var now = new Date();
var date = timedate.getTime() - now.getTime();
var time = Math.floor(date / (1000 * 60 * 60 * 24));
if (time >= 0)
document.write("Now there are: "+time +"days" from "+times+")</script>
[Ctrl+A Select All Tips: You can modify part of the code first and then press Run]
11. Water reflection effect
HTML code
<img id="reflect" src="Your own image file name" width="175" height="59">
<script language="Javascript">
function f1()
{
setInterval("mdiv.filters.wave.phase+=10",100);
}
if(document.all)
{
document.write('<img id=mdiv src="'+document.all.reflect.src+'"
style="filter:wave(strength=3,freq=3,phase=0,lightstrength=30) blur() flipv()">')
window.onload=f1
}
</script>
[Ctrl+A Select All Tips: You can modify part of the code first and then press Run]
12. Slowly growing window
HTML code
<script Language="Javascript">
<!--
var Windowsheight=100
var Windowswidth=100
varnumx=5
function openwindow(thelocation){
temploc=thelocation
if
(!(window.resizeTo&&document.all)&&!(window.resizeTo&&document.getElementById))
{
window.open(thelocation)
return
}
windowsize=window.open("","","scrollbars")
windowsize.moveTo(0,0)
windowsize.resizeTo(100,100)
tenumxt()
}
function tenumxt(){
if (Windowsheight>=screen.availHeight-3)
numx=0
windowsize.resizeBy(5,numx)
Windowsheight+=5
Windowswidth+=5
if (Windowswidth>=screen.width-5)
{
windowsize.location=temploc
Windowsheight=100
Windowswidth=100
numx=5
return
}
setTimeout("tenumxt()",50)
}
//-->
</script>
<p> <a href="javascript:openwindow(<a href=" http://www.code-123.com " target="_blank" rel="external"> http://www.code-123. com</a>)">Enter</a>
[Ctrl+A Select All Tips: You can modify part of the code first and then press Run]
13. To change the IE icon in the IE address bar
and copy the content to the clipboard, we need to first make a 16*16 icon (icon file) and save it as index.ico. Upload this icon file to the root directory and add the following code between <head></head> on the homepage:
<link REL = "Shortcut Icon" href="index.ico">
14. Click the button to print out
the HTML code
of the current page
<script Language="Javascript">
<!-- Begin
if (window.print) {
document.write('<form>'
+ '<input type=button name=print value="Print this page" '
+ 'onClick="javascript:window.print()"></form>');
}
// End -->
</script>
[Ctrl+A Select All Tips: You can modify part of the code first and then press Run]
15. Click button 'Save as' current page
HTML code
<input type="button" name="Button" value="Save this page"
onClick="document.all.button.ExecWB(4,1)">
<object id="button"
width=0
height=0
classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2">
<embed width="0" height="0"></embed>
</object>
[Ctrl+A Select All Tips: You can modify part of the code first and then press Run]
16. Display the system's current date
HTML code
<script language=Javascript>
today=new Date();
function date(){
this.length=date.arguments.length
for(var i=0;i<this.length;i++)
this[i+1]=date.arguments }
var d=new date("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
document.write(
"<font color=##000000 style='font-size:9pt;font-family: 宋体'> ",
today.getYear(),"year",today.getMonth()+1,"month",today.getDate(),"day",
d[today.getDay()+1],"</font>" );
</script>
[Ctrl+A Select All Tips: You can modify part of the code first and then press Run]
17. Display different greeting
HTML codes
in different time periods
<script Language="Javascript">
<!--
var text=""; day = new Date( ); time = day.getHours( );
if (( time>=0) && (time < 7 ))
text="Night owls, please pay attention to your health! "
if (( time >= 7 ) && (time < 12))
text="Today's weather... hahaha, don't you want to go play?"
if (( time >= 12) && (time < 14))
text="It's lunch break, my friend must not be used to taking naps, right?!"
if (( time >=14) && (time < 18))
text="It's time for afternoon tea, let's take a rest! "
if ((time >= 18) && (time <= 22))
text="You're here again, don't chat with MM for too long!"
if ((time >= 22) && (time < 24))
text="It's very late, make sure to get some rest!"
document.write(text)
//--->
</script>
[Ctrl+A All selection tips: You can modify some codes first and then press run]
18. Non-stop music
HTML code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<a href=" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd " target= "_blank" rel="external">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>">
<html xmlns="<a href=" http://www.w3.org/1999/xhtml " target="_blank" rel="external">http://www.w3.org/1999/xhtml</ a>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<p>
<input name="src" type="file" id="src" value="E:music2fighter.mp3" />
</p>
<p>
<input type="button" name="button" id="button" value="Play" onclick="play(document.getElementById('src').value)" />
<input type="button" name="button2" id="button2" value="Stop" onclick="stop()" />
<input type="button" name="button2" id="button2" value="Pause" onclick="pause()" />
</p>
</body>
</html>
<script>
var player = new ActiveXObject("MediaPlayer.MediaPlayer");
function play(pSrc){
if(pSrc == ""){
alert("Please select the music you want to play!");
return ;
}
player.Open(pSrc);
}
function stop(){
player.Stop();
}
function pause(){
player.Pause();
}
</script>
[Ctrl+A All selection tips: You can modify part of the code first, and then press Run]
19. The effect of seamless scrolling of images up, down, left, and right (compatible with Firefox and IE)
HTML code
<html xmlns="<a href=" http://www.w3.org/1999/xhtml " target="_blank" rel="external">http://www.w3.org/1999/xhtml</ a>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>The effect of seamlessly scrolling pictures up, down, left, and right (compatible with Firefox and IE)</title>
</head>
<body>
<!--The following is the scroll-up code-->
<div id=jsweb8_cn_top style=overflow:hidden;height:100;width:90;>
<div id=jsweb8_cn_top1>
<img src="<a href= " <img src="<a href=" <img src="<a href=" <img src="<a href=" <img src="<a href=" <img src="<a href=" <img src="<a href=" <img src="<a href=" <img src="<a href=" </div>
<div id=jsweb8_cn_top2></div>
</div>
<script>
var speed=30
jsweb8_cn_top2.innerHTML=jsweb8_cn_top1.innerHTML //Clone jsweb8_cn_top1 as jsweb8_cn_top2
function Marquee1(){
//When scrolling to the junction of jsweb8_cn_top1 and jsweb8_cn_top2
if(jsweb8_cn_top2.offsetTop-jsweb8_cn_top.scrollTop<=0)
jsweb8_cn_top.scrollTop-=jsweb8_cn_top1.offsetHeight //jsweb8_cn_top jumps to the top
else{
jsweb8_cn_top.scrollTop++;
}
}
var MyMar1=setInterval(Marquee1,speed)//Set timer
//Clear the timer when the mouse moves up to stop the scrolling
jsweb8_cn_top.onmouseover=function() {clearInterval(MyMar1)}
//Reset the timer when the mouse is moved away
jsweb8_cn_top.onmouseout=function(){MyMar1=setInterval(Marquee1,speed)}
</script>
<!--End of scrolling up code-->
<br>
<!--The following is the scrolling code-->
<div id=jsweb8_cn_bottom style=overflow:hidden;height:100;width:90;>
<div id=jsweb8_cn_bottom1>
<img src="<a href= " <img src="<a href=" <img src="<a href=" <img src="<a href=" <img src="<a href=" <img src="<a href=" <img src="<a href=" <img src="<a href=" <img src="<a href=" </div>
<div id=jsweb8_cn_bottom2></div>
</div>
<script>
var speed=30
jsweb8_cn_bottom2.innerHTML=jsweb8_cn_bottom1.innerHTML
jsweb8_cn_bottom.scrollTop=jsweb8_cn_bottom.scrollHeight
function Marquee2(){
if(jsweb8_cn_bottom1.offsetTop-jsweb8_cn_bottom.scrollTop>=0)
jsweb8_cn_bottom.scrollTop+=jsweb8_cn_bottom2.offsetHeight
else{
jsweb8_cn_bottom.scrollTop--
}
}
var MyMar2=setInterval(Marquee2,speed)
jsweb8_cn_bottom.onmouseover=function() {clearInterval(MyMar2)}
jsweb8_cn_bottom.onmouseout=function() {MyMar2=setInterval(Marquee2,speed)}
</script>
<!--Scroll down to end of code-->
<br>
<!--The following is the code for scrolling to the left-->
<div id="jsweb8_cn_left" style="overflow:hidden;width:500px;">
<table cellpadding="0" cellspacing="0" border="0">
<tr><td id="jsweb8_cn_left1" valign="top" align="center">
<table cellpadding="2" cellspacing="0" border="0">
<tr align="center">
<td><img src="<a href=" <td><img src="<a href=" <td><img src="<a href=" <td><img src="<a href =" <td><img src="<a href=" <td><img src="<a href=" <td><img src="<a href=" </tr>
</table>
</td>
<td id="jsweb8_cn_left2" valign="top"></td>
</tr>
</table>
</div>
<script>
var speed=30//The larger the speed value, the slower the speed
jsweb8_cn_left2.innerHTML=jsweb8_cn_left1.innerHTML
function Marquee3(){
if(jsweb8_cn_left2.offsetWidth-jsweb8_cn_left.scrollLeft<=0)
jsweb8_cn_left.scrollLeft-=jsweb8_cn_left1.offsetWidth
else{
jsweb8_cn_left.scrollLeft++
}
}
var MyMar3=setInterval(Marquee3,speed)
jsweb8_cn_left.onmouseover=function() {clearInterval(MyMar3)}
jsweb8_cn_left.onmouseout=function() {MyMar3=setInterval(Marquee3,speed)}
</script>
<!--End of scrolling left code-->
<br>
<!--The following is the code for scrolling to the right-->
<div id="jsweb8_cn_right" style="overflow:hidden;width:500px;">
<table cellpadding="0" cellspacing="0" border="0">
<tr><td id="jsweb8_cn_right1" valign="top" align="center">
<table cellpadding="2" cellspacing="0" border="0">
<tr align="center">
<td><img src="<a href=" <td><img src="<a href=" <td><img src="<a href=" <td><img src="<a href =" <td><img src="<a href=" </tr>
</table>
</td>
<td id="jsweb8_cn_right2" valign="top"></td>
</tr>
</table>
</div>
<script>
var speed=30//The larger the speed value, the slower the speed
jsweb8_cn_right2.innerHTML=jsweb8_cn_right1.innerHTML
function Marquee4(){
if(jsweb8_cn_right.scrollLeft<=0)
jsweb8_cn_right.scrollLeft+=jsweb8_cn_right2.offsetWidth
else{
jsweb8_cn_right.scrollLeft--
}
}
var MyMar4=setInterval(Marquee4,speed)
jsweb8_cn_right.onmouseover=function() {clearInterval(MyMar4)}
jsweb8_cn_right.onmouseout=function() {MyMar4=setInterval(Marquee4,speed)}
</script>
<!--End of scrolling code to the right-->
</body>
</html>
[Ctrl+A All selection tips: You can modify part of the code first, then click Run]
20. Continuously scroll
the HTML code
to the left
<div id=demo style=overflow:hidden;height:139;width:232;background:#f4f4f4;color:#ffffff><table align=left cellpadding=0 cellspace=0 border=0><tr><td id =demo1 valign=top><img src="<a href=" <script>
var speed=30
demo2.innerHTML=demo1.innerHTML
function Marquee(){
if(demo2.offsetWidth-demo.scrollLeft<=0)
demo.scrollLeft-=demo1.offsetWidth
else{
demo.scrollLeft++
}
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>
[Ctrl+A Select All Tips: You can modify part of the code first and then press Run]
21. Scroll
HTML code
to the right without interruption
<div id=demo style=overflow:hidden;height:139;width:232;background:#f4f4f4;color:#ffffff><table align=left cellpadding=0 cellspace=0 border=0><tr><td id =demo1 valign=top><img src="<a href=" <script>
var speed=30
demo2.innerHTML=demo1.innerHTML
demo.scrollLeft=demo.scrollWidth
function Marquee(){
if(demo.scrollLeft<=0)
demo.scrollLeft+=demo2.offsetWidth
else{
demo.scrollLeft--
}
}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>
[Ctrl+A Select All Tips: You can modify part of the code first and then press Run]
Continuous scrolling or uninterrupted scrolling code (various scrolling methods) is compatible with IE and FireFox Opera Maxthon and other browsers' interval scrolling code
from left to right Method 1:
HTML code
<div id=demo style="OVERFLOW: hidden; WIDTH: 980px; height: 80px;align: center">
<table cellspacing="0" cellpadding="0" align="center"
border="0">
<tbody>
<tr>
<td id="marquePic1" valign="top">
<table width="980" height="80" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="148" height="60" bgcolor="#F2F6FB"><a href="#" target="_blank"><img src="/img/bottom_ad01.gif" border="0"> </a></td>
<td width="148" height="60" bgcolor="#F2F6FB"><a href="#" target="_blank"><img src="/img/bottom_ad02.gif" border="0"> </a></td>
<td width="148" height="60" bgcolor="#F2F6FB"><a href="#" target="_blank"><img src="/img/bottom_ad03.gif" border="0"> </a></td>
<td width="148" height="60" bgcolor="#F2F6FB"><a href="#" target="_blank"><img src="/img/bottom_ad04.gif" border="0"> </a></td>
<td width="148" height="60" bgcolor="#F2F6FB"><a href="#" target="_blank"><img src="/img/bottom_ad05.gif" border="0"> </a></td>
<td width="148" height="60" bgcolor="#F2F6FB"><a href="/info/about.asp?id=4" target="_blank"><img src="/img/bottom_ad06 .gif" border="0"></a></td>
</tr>
</table>
</td>
<td id="marquePic2" valign="top"></td>
</tr>
</tbody>
</table>
</div>
<script type=text/javascript>
var speed=80 <!--The larger the value, the slower the speed-->
marquePic2.innerHTML=marquePic1.innerHTML
function Marquee(){
if(demo.scrollLeft>=marquePic1.scrollWidth){
demo.scrollLeft=0
}else{
demo.scrollLeft++
}}
var MyMar=setInterval(Marquee,speed)
demo.onmouseover=function() {clearInterval(MyMar)}
demo.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
</script>
[Ctrl+A Select All Tips: You can modify part of the code first, then press Run]
Method 1 from bottom to top:
HTML code
<table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr> <td align="center"> <table width="150" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="194" style="padding-top:8px" valign="top">
<DIV id=rolllinkk style="OVERFLOW: hidden; WIDTH: 145px; HEIGHT: 200px">
<DIV id=rolllinkk1>
<!--The following is the content you want to display-->
<table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr> <td align="center">The best means of transportation</td> </tr>
<tr> <td align="center">The best means of transportation</td> </tr>
<tr> <td align="center">The best means of transportation</td> </tr>
<tr> <td align= "center">The best means of transportation</td> </tr>
<tr> <td align="center">The best means of transportation</td> </tr>
<tr> <td align="center"> The best means of transportation</td> </tr>
<tr> <td align="center">The best means of transportation</td> </tr>
<tr> <td align="center">The best means of transportation </td> </tr>
<tr> <td align="center">The best means of transportation</td> </tr>
<tr> <td align="center">The best means of transportation</td> </tr>
<tr> <td align="center">The best means of transportation</td> </tr>
</table>
<!-- End of displayed content! -->
<DIV align=center> </DIV> </DIV>
<DIV id=rolllinkk2>
<DIV align=center> </DIV> </DIV> </DIV>
<SCRIPT>
var rollspeed=30
rolllinkk2.innerHTML=rolllinkk1.innerHTML //
function Marquee1(){
if(rolllinkk2.offsetTop-rolllinkk.scrollTop <=0) //
rolllinkk.scrollTop-=rolllinkk1.offsetHeight //
else{
rolllinkk.scrollTop++
}
}
var MyMar1=setInterval(Marquee1,rollspeed) //
rolllinkk.onmouseover=function() {clearInterval(MyMar1)}//
rolllinkk.onmouseout=function() {MyMar1=setInterval(Marquee1,rollspeed)}//
</SCRIPT>
</td>
</tr>
</table>
</td> </tr>
</table>
[Ctrl+A All selection tips: You can modify part of the code first, then press Run]
Continuous multi-line scrolling, control button
HTML code
<script language="JavaScript" defer>
//qswh's original and modified by windy_sk < [email protected] > 20040120
function reportError(msg,url,line) {
var str = "You have found an error as below: nn";
str += "Err: " + msg + " on line: " + line;
alert(str);
return true;
}
window.onerror = reportError;
var obj_marquee = document.getElementById("marquee");
var repeat = null;
var marquee_spd = 50;
function marquee_init() {
var obj_unit = obj_marquee.firstChild;
var marquee_high = parseInt(obj_marquee.style.height);
var marquee_wide = parseInt(obj_marquee.style.width);
var unit_high = obj_unit.offsetHeight;
var unit_wide = obj_unit.offsetWidth;
var m = 0, n = 0, i = 0;
var tmp = null;
m = Math.ceil(marquee_wide / unit_wide);
n = Math.ceil(marquee_high / unit_high);
obj_unit.style.width = marquee_wide * (m+1);
obj_unit.rows[0].cells[0].style.width = obj_marquee.style.width;
for(i=0; i<m; i++) {
tmp = obj_unit.rows[0].insertCell(-1);
tmp.innerHTML = obj_unit.rows[0].cells[0].innerHTML;
tmp.style.width = marquee_wide;
tmp = null;
}
for(i=0; i<n; i++) {
obj_marquee.appendChild(obj_unit.cloneNode(true));
}
return;
}
function marquee_show(direction) {
switch(direction) {
case "up":
if(obj_marquee.scrollTop >= obj_marquee.children[1].offsetTop) {
obj_marquee.scrollTop -= obj_marquee.firstChild.offsetHeight;
} else {
obj_marquee.scrollTop++;
}
break;
case "down":
if(obj_marquee.scrollTop <= 0) {
obj_marquee.scrollTop += obj_marquee.firstChild.offsetHeight;
} else {
obj_marquee.scrollTop--;
}
break;
case "left":
if(obj_marquee.scrollLeft >= obj_marquee.firstChild.rows[0].cells[0].offsetWidth) {
obj_marquee.scrollLeft -= obj_marquee.firstChild.rows[0].cells[0].offsetWidth;
} else {
obj_marquee.scrollLeft++;
}
break;
case "right":
if(obj_marquee.scrollLeft <= 0) {
obj_marquee.scrollLeft += obj_marquee.firstChild.rows[0].cells[0].offsetWidth;
} else {
obj_marquee.scrollLeft--;
}
break;
default:
break;
}
return;
}
function marquee_doit() {
var direction = "";
direction = obj_marquee.getAttribute("direction");
if(direction != null) marquee_show(direction);
direction = obj_marquee.getAttribute("direction2");
if(direction != null) marquee_show(direction);
return;
}
marquee_init();
repeat = setInterval("marquee_doit()",marquee_spd);
marquee.onmouseover = function() {clearInterval(repeat);}
marquee.onmouseout = function() {repeat=setInterval("marquee_doit()",marquee_spd);}
</script>
<table style="border:1px black solid;"><tr><td>
<div id="marquee" direction="up" style="overflow:hidden;height:200px;width:250px">
<table style="border:0px;padding:0px;"><tr><td>
<!-- Marquee Body Head -->
<a href="#" target="_blank">Classic Forum</a><br>
<a href="#" target="_blank">163.com</a><br>
<a href="#" target="_blank">21cn.com</a><br>
<a href="#" target="_blank">Happy new year</a>
<!-- Marquee Body Bottom -->
</td></tr></table>
</div>
</td></tr></table>
Direction1:
<input type="button" value="↑" onclick="obj_marquee.direction='up'">
<input type="button" value="↓" onclick="obj_marquee.direction='down'">
<input type="button" value="←" onclick="obj_marquee.direction='left'">
<input type="button" value="→" onclick="obj_marquee.direction='right'">
<input type="button" value=" X " onclick="obj_marquee.direction=''"> <br>
Direction2:
<input type="button" value="↑" onclick="obj_marquee.direction2='up'">
<input type="button" value="↓" onclick="obj_marquee.direction2='down'">
<input type="button" value="←" onclick="obj_marquee.direction2='left'">
<input type="button" value="→" onclick="obj_marquee.direction2='right'">
<input type="button" value=" X " onclick="obj_marquee.direction2=''">
[Ctrl+A Select All Tips: You can modify part of the code first and then press Run]