我的编码中有一个while循环
while (($i < $num3b)&&($i < ($start+$perpage))) {
$tododetail_id=mysql_result($result3b,$i,"tododetail_id");
$comment=formatUrlsInText(mysql_result($result3b,$i,"comment"));
$staff_name=mysql_result($result3b,$i,"staff_name");
echo "<tr><td><span><font color='#5858FA'>" . $staff_name . nl2br($comment) . "</font>
<span style='float:right' id='create-user'>Reply Message</span>";
$i++;}
如何onclick“回复消息”jquery会$staff_name
相应地弹出$comment
。这是我的jQuery代码
$( '[id^="create-user"]')
.click(function() {
var nameStf = $(this).data('id');
alert (nameStf);
$( "#dialog-form" ).dialog( "open" );
});
谢谢