<html>
<head>
<style type="text/css">
.initial2{font-weight:bold;background-color:lime}
</style>
<script type="text/javascript">
<!--
/***********************************************
* Rollover background-color button Script- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
//Specify optional button target: "_new" for new window, or name of FRAME target (ie "myframe")
var buttontarget=""
function change(e, color){
var el=window.event? event.srcElement: e.target
if (el.tagName=="INPUT"&&el.type=="button")
el.style.backgroundColor=color
}
function jumpto2(url){
if (buttontarget=="")
window.location=url
else if (buttontarget=="_new")
window.open(url)
else
parent[buttontarget].location=url
}
//-->
</script>
</head>
<body>
<form onMouseover="change(event, 'yellow')" onMouseout="change(event, 'lime')">
<input type="button" value="Yahoo" class="initial2" onClick="jumpto2('http://yahoo.com')"> 
<input type="button" value="Google" class="initial2" onClick="jumpto2('http://google.com')"> 
<input type="button" value="AlltheWeb" class="initial2" onClick="jumpto2('http://alltheweb.com')">
</form> 
</body>
</html>
'script' 카테고리의 다른 글
| 마우스 오버시 나타나는 메뉴 (0) | 2012.02.17 | 
|---|---|
| 팝업 정가운데 띄우기 (0) | 2012.02.17 | 
| 스크린 사이즈 (0) | 2012.02.17 | 
| 툴팁 하단 텍스트 (0) | 2012.02.17 | 
| 페이지내 이동3 (0) | 2012.02.17 |