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>
參考
沒有留言:
張貼留言