<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>默认未勾选</title> <mce:script type="text/javascript"><!-- function Disable(e){ var Itxt=document.getElementByIdx("btn1"); if(e.checked==true) { Itxt.disabled=false;//勾选了同意服务协议才激活按钮 Itxt.className="btn1"; } else { Itxt.disabled=true; Itxt.className="btn0"; } } // --></mce:script> <mce:style type="text/css"><!-- #btn1{width:51px; height:21px; border:none;cursor:pointer;} .btn0{background:url(btn.gif) 0 0;} .btn1{background:url(btn.gif) 0 -21px;} .btn2{background:url(btn.gif) 0 -42px;} --></mce:style><style type="text/css" mce_bogus="1">#btn1{width:51px; height:21px; border:none;cursor:pointer;} .btn0{background:url(btn.gif) 0 0;} .btn1{background:url(btn.gif) 0 -21px;} .btn2{background:url(btn.gif) 0 -42px;}</style> </head> <body> <input type="checkbox" id="checkbtn" οnclick="Disable(this);"/>同意本<a href="#" mce_href="#">服务协议</a><br /> <input type="button" id="btn1" value="" class="btn0" disabled="false" οnmοuseοver="this.className='btn2'" οnmοuseοut="this.className='btn1'" /> </body> </html>