<head><script> // mq1 는 좌우 제어 // mq2는 상하 제어 // 물론 소스 수정하면 동시 제어도 가능;; // 실행 function move(direction, kind) { // mq1 인지 mq2 인지 구분하여 그에 맞게 Marquee 태그 실행 if(kind == 1) { mq1.start(); } else { mq2.start(); } // 왼쪽 (mq1) if(direction == 'L' || direction == 'l') { mq1.direction = 'left'; } // 오른쪽 (mq1) else if(direction == 'R' || direction == 'r') { mq1.direction = 'right'; } // 위쪽 (mq2) else if(direction == 'U' || direction == 'u') { mq2.direction = 'up'; } // 아래쪽 (mq2) else { mq2.direction = 'down'; } } // 정지 function stop(kind) { // mq 인지 mq2 인지 구분하여 그에 맞게 Marquee 태그 정지 if(kind == 1) { mq1.stop(); } else { mq2.stop(); } } </script> </head> <!-- 페이지를 다 읽으면 Marquee 태그 정지 --> <body onload="stop(1); stop(2);"> <center><br> <br> <br> <marquee id="mq1" width="100" truespeed scrollamount="1" scrolldelay="15" bgcolor="ghostwhite" style="border:1 solid highlight;">123</marquee> <br> <br> <a href="javascript:;" onmouseover="move('L', 1);" onmouseout="stop(1)" onfocus="this.blur();"> 왼쪽으로</a> | <a href="javascript:;" onmouseover="move('R', 1);" onmouseout="stop(1)" onfocus="this.blur();"> 오른쪽으로</a> <br> <br> <br> <marquee id="mq2" width="100" height="100" truespeed scrollamount="1" scrolldelay="15" bgcolor="ghostwhite" style="border:1 solid highlight;">123</marquee> <br> <br> <a href="javascript:;" onmouseover="move('U', 2);" onmouseout="stop(2)" onfocus="this.blur();"> 위쪽으로</a> | <a href="javascript:;" onmouseover="move('D', 2);" onmouseout="stop(2)" onfocus="this.blur();"> 아래쪽으로</a> </center> </body>