I am creating a student information form in html as in the image:
我在html中创建一个学生信息表单,如图所示:
My next button is an image and the code for it is as follows:
我的下一个按钮是图像,其代码如下:
<input type="image" id="registersubmit6" name="registersubmit6" src="images/arrow-right.png" title="finish" onclick=""/>
When user clicks on next button, I want to submit this form and move to next page.How I can do both at the moment?
当用户点击下一个按钮时,我想提交此表单并转到下一页。我现在可以做两件事吗?
Should I use javascript or PHP? and if yes then how?
我应该使用JavaScript还是PHP?如果是,那怎么样?
1 个解决方案
#1
1
<input type="image" id="registersubmit6" name="registersubmit6" src="images/arrow-right.png" title="finish" onclick="submitForm()"/>
function submitForm(){
document.getElementById('id of your form').submit();
}
#1
1
<input type="image" id="registersubmit6" name="registersubmit6" src="images/arrow-right.png" title="finish" onclick="submitForm()"/>
function submitForm(){
document.getElementById('id of your form').submit();
}