2013-02-12 55 views
-1

我的应用程序中有多个用户。在用户列表中,每个用户都有一个用于数据提交的按钮。数据将会弹出提交。我必须使用jquery生成popup和jquery-json组合来将数据保存到数据库中。 我可以在多个按钮上使用单击弹出式菜单吗?请建议我。单弹出可以为多个按钮添加文本

例如

<table width="98%" border="0" cellspacing="2" cellpadding="2" bgcolor="#efead8" style="border:#FFCC00 1px solid;"> 
     <tr><th bgcolor="#cccccc" align="right">&nbsp;S.No.&nbsp;</th><th bgcolor="#cccccc" align="left">&nbsp;Client&nbsp;</th><th bgcolor="#cccccc" align="center">&nbsp;Cost List&nbsp;</th><th bgcolor="#cccccc" align="center">&nbsp;Action&nbsp;</th><tr>'; 
     foreach($arrclient as $k => $v) 
      $strPrint.='<tr><td align="right">&nbsp;'.++$i.'&nbsp;</td><td align="left">&nbsp;'.$v.'&nbsp;</td><td align="center">&nbsp;Cost List&nbsp;</td><td align="center">&nbsp;<input type="button" name="new_ci" id="new_ci" value="New cost list" />&nbsp;</td><tr>'; 

     $strPrint.='</table>'; 

在此先感谢。

+0

“我可以在多个按钮上单击弹出式菜单吗?”你能解释一下吗? – 2013-02-12 07:02:49

+0

单弹出式单击多个按钮?笏这意味着,如果你想单击方法中的所有弹出通过ID使用单一的方法。 – Meraj 2013-02-12 07:06:30

+0

是的,Meraj是对的,但我如何使用它? – 2013-02-12 07:06:43

回答

0
$strPrint.='<tr><td align="right">&nbsp;'.++$i.'&nbsp;</td><td align="left">&nbsp;'.$v.'&nbsp;</td><td align="center">&nbsp;Cost List&nbsp;</td><td align="center">&nbsp;<input type="button" name="new_ci" id="new_ci" value="New cost list" onclick="OpenPopup(this)" />&nbsp;</td><tr>'; 


function(obj) 
{ 
// do wat ever u want 
} 
相关问题