Heim  >  Artikel  >  Web-Frontend  >  submit的使用_html/css_WEB-ITnose

submit的使用_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:12:001041Durchsuche

<form name="form3" id="" method="post" action="add.jsp">	 	<input id="dd" type="text" name="ana" />	 	<input id="dd" type="text" name="ano" />		<input id="dd" type="text" name="aqq" />		<input id="dd" type="text" name="aaddr"/>		<br>         <input type="submit" value="保存" name="b" > <input type="submit" value="查询" name="c" ><input type="reset" value="重写">         </form>

点击保存可以进入add.jsp,怎么让查询点击后可以进入fi.jsp。


回复讨论(解决方案)

 因为你采用了同样的submittype。。点击之后只会触发form的action。。想实现的话直接用button。。然后再写点击后的方法













非常感谢!





++




查询按钮应该用 button,不需要用submit

type=submit是发送表单
Submit将表单提交(form.submit())作为其onclick后的默认事件

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn