HTML onsubmit 事件屬性
瀏覽器支持
所有主流瀏覽器都支持onsubmit 事件屬性
定義和用法
onsubmit 屬性在表單提交時觸發。
onsubmit 屬性只適用於<form> 元素。
HTML 4.01 與HTML5之間的差異
無。
語法
<form onsubmit=" script ">
屬性值
值 | 描述 |
---|---|
script | 规定该onsubmit事件触发时执行的脚本。 |
HTML事件屬性
所有主流瀏覽器都支持onsubmit 事件屬性
onsubmit 屬性在表單提交時觸發。
onsubmit 屬性只適用於<form> 元素。
無。
值 | 描述 |
---|---|
script | 规定该onsubmit事件触发时执行的脚本。 |