使用圖像製作按鈕 (button) – 送出/清除

須要利用 JavaScript 去協助。

<script language=”JavaScript”>
<!–


function formreset(){
document.inputarea.subject.value=”;
document.inputarea.name.value=”;
document.inputarea.url.value=’http://’;
document.inputarea.mail.value=”;
document.inputarea.use_cookie.checked=true;
document.inputarea.message.value=”;
}


// –>
</script>

請複製到 <head>~</head>部分,
按鈕部分如下

<input type=”image” name=”SUBMIT” src=”xxx.gif” width=”xx” height=”xx” border=”0″>
<a href=”JavaScript:formreset()”><img src=”xxx.gif” width=”xx” height=”xx” border=”0″></a>

另外留言表單亦需要修改

<form method=”post” action=”apeboard_plus.cgi” name=”inputarea”>
<input type=”hidden” name=”command” value=”write”>

追加表單名稱以供 JavaScript 辨別

Leave a Reply

Your email address will not be published. Required fields are marked *