html代码如下:
<form name="form1" method="post" action="test1.php">
<input type="text" name="username">
<img src="public/images/1.png" alt="submit" width="100px" οnclick="submit(document.form1)">
<img src="public/images/2.png" alt="reset" width="100px" οnclick="reset(document.form1)">
</form>
js代码如下:
function submit(obj){
obj.submit();
}
function reset(obj){
obj.reset();
}