是否可以将一个span的标题赋给一个php变量?如何将一个span标题分配给一个php变量?
我加入以下跨度到我的表是从我的数据库中生成:
while ($row = $database->fetch_array($result))
{
$i=1-$i;
$class = "row".$i;
echo "<tr class='{$class}' id='{$row['productId']}'>
<td > <span class='productId' title='{$row['productId']}' >". $row['category']."</span></td>
<td >" . $row['productNo']. "</td>
<td>" . $row['productName']. "</td>
<td class='edit'>" . intval($row['quantity']). "</td>
<td>" . $row['sfLf']. "</td>
<td>". $row['cost']. "</td>
<td>". $row['total']."</td>
</tr>";
}
现在
,当我在这段时间里点击,我想下面的jQuery UI弹出并显示数据关联到从另一个表被点击我的数据库中该行:
$(document).ready(function() {
//first we fade in the form when the button is clicked
var dialog = $("#editInventory").dialog({
autoOpen: false,
title: "Add New Order",
modal: true,
width: 780,
show: { effect: 'drop',direction:"up",duration:1000 },
hide: { effect: 'drop',direction:"down",duration:1000 },
buttons: {
'Submit':function() {
submitForm($("#addNewInvoice"));
},
'Cancel':function() {
$(this).dialog('close');
$("#container").fadeTo('slow',1);
}
}
});
$(".productId").click(function() {
dialog.dialog('open');
$("#container").fadeTo('slow',.4);
return false;
});
});
问题不清楚 – 2013-02-22 08:24:52
尝试添加代码,同时添加问题 – 2013-02-22 08:25:22
这取决于如何在代码中表示跨度。另外请注意,通常'span's _don't_没有标题 – 2013-02-22 08:27:42