Кнопка, меняющая цвет при наведении курсора
<html> <head> <title>Кнопка, меняющая цвет при наведении курсор</title> <style type="text/css"> .bigChange {color:#006600; font-weight:bolder; font-size:175%; letter-spacing:4px; text-transform: uppercase; background:yellow} .start {color:yellow; background:#006600; bolder: Lime; } </STYLE> </head> <body> <SCRIPT LANGUAGE=JAVASCRIPT> function highlightButton(s) { if ("INPUT"==event.srcElement.tagName) event.srcElement.className=s } </SCRIPT> <FORM NAME=highlight onmouseover="highlightButton('start')" onmouseout="highlightButton('')"> <input type="button" value="Button 1" style="border-color: #ffff00;"> <input type="button" value="Button 2" style="border-color: #ffff00;"> </FORM> </body> </html>
Кнопка, меняющая фон при наведении курсора
<html> <head> <title>Кнопка, меняющая фон при наведении курсора</title> </head> <body> <script> <!-- function change2(image){ var el=event.srcElement if (el.tagName=="INPUT"&&el.type=="button") event.srcElement.style.backgroundImage="url"+"('"+image+"')" } function jumpto2(url){ window.location='../index.shtml' } //--> </script> <form onMouseover="change2('../img/bg-g.gif')" onMouseout="change2('../img/bg-b.gif')"> <input type="button" value=" 1 " class="initial" onClick="jumpto2('http://scriptic.ru')" style="background:url(../img/bg-b.gif);border-color: #000000;"> <input type="button" value=" 2 " class="initial" onClick="jumpto2('http://scriptic.ru')" style="background:url(../img/bg-b.gif);border-color: #000000;"> <input type="button" value=" 3 " class="initial" onClick="jumpto2('http://scriptic.ru')" style="background:url(../img/bg-b.gif);border-color: #000000;"> </form> </body> </html>
Кнопка, меняет текст после клика.
|