& lthead & gt
& lttitle & gt按鈕被單擊
& ltscript type = " text/JavaScript " & gt;
& lt!-
函數BTMsg(msg) { //v1.0
警報(消息);
}
//-& gt;
& lt/script & gt;
& lt/head & gt;
& ltbody & gt
& ltform id = " form 1 " name = " form 1 " method = " post " action = " " & gt;
& lt標簽& gt
& ltinput name = " button " type = " submit " ID = " button " onclick = " btmsg('單擊了銨按鈕!')" value = " button "/& gt;
& lt/label & gt;
& lt/form & gt;
& lt/body & gt;
& lt/html & gt;