是否可以將一個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