2013年12月9日 星期一

[HTML]Button產生器

網址


button直接呼叫移出移入function


  • <form name="groovyform">
  • <input
  •    type="button"
  •    name="groovybtn1"
  •    class="groovybutton"
  •    value="Check"
  •    title=""
  •    onMouseOver="goLite(this.form.name,this.name)"
  •    onMouseOut="goDim(this.form.name,this.name)" >
  • </form>



  • <script language="javascript">

  • function goLite(FRM,BTN)
  • {
  •    window.document.forms[FRM].elements[BTN].style.color = "#FFFFFF";
  •    window.document.forms[FRM].elements[BTN].style.backgroundColor = "#000000";
  •    window.document.forms[FRM].elements[BTN].style.borderStyle = "solid";
  • }

  • function goDim(FRM,BTN)
  • {
  •    window.document.forms[FRM].elements[BTN].style.color = "#FFFF00";
  •    window.document.forms[FRM].elements[BTN].style.backgroundColor = "#330000";
  •    window.document.forms[FRM].elements[BTN].style.borderStyle = "dotted";
  • }

  • </script>
參考


沒有留言:

張貼留言