2013-02-12 57 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 
} 
相關問題