English 中文(简体)
2. 提交表格的问题
原标题:Problems with submitting a form on a page with two forms
  • 时间:2010-09-12 13:15:58
  •  标签:
  • jquery
  • html

我有两页。 他们的孩子是“ete子”和“add子”。 关于删除表格,我还有一份小篇文字,在呈文中,我询问我是否希望删除选定的条目:

$( form#delete ).submit(function(){
   if(confirm( Are you sure you want to delete? )) { 
     return true; 
   } else { 
     return false;          
   }
});

一切都为这种形式做了罚款,但当我想提交第二个表格时,我也看到这种确认。 我怎么能够摆脱这种状况,提出第二种形式的权利?

下面是我的两种形式

<form name="delete" id="delete" method="post" action="index.php?action=delete">
<input type="checkbox" name="delete_all" id="delete_all" value="" />
<input type="checkbox" name="car[]" class="delete_checkbox" value="1" /> First car
<input type="checkbox" name="car[]" class="delete_checkbox" value="2" /> Second car
<input type="checkbox" name="car[]" class="delete_checkbox" value="3" /> Third car
<input type="submit" name="submit_delete" value="Delete" />
</form>

<form name="add" id="add" method="post" action="index.php?action=add">
Car name: <input type="text" name="car_name" value="" />
Car owner: <input type="text" name="car_owner" value="" />
<input type="submit" name="submit_add" value="Add" />
</form>

谢谢。

Lated ed ed ed edit: 这是一个 st错、ry、一种形式tag被适当封闭。

问题回答

精神,我同意点和尼克。 其他浏览器是否也存在同样的问题? 如果你改变孩子的名字,会发生什么情况? 您能否复制并贴出你在这里的整页,而不仅仅是 s子? 您的网页是否在一片镜子内展示?

也许,要清除你们的浏览器。

http://www.sprymedia.co.uk/article/Visual+ 活动,以发现所附事件的地点。





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签