Why do all buttons only control the same row of data ??? Why do all buttons only control the same row of data? How can this problem be solved. & Lt ;! DOCTYPE & nbsp; html & nbsp; PUBLIC & nbsp; "-// W3C // DTD & nbsp; HTML & nbsp; 4.01 & nbsp; Transitional // EN" & nbsp; "Why do all buttons only control the same row of data ???
Why do all buttons only control the same row of data? How can this problem be solved.
Insert title here
function showtd(num) {
document.getElementById("bg"+num).style.display = "none";
document.getElementById("show"+num).style.display = "block";
document.getElementById("ba"+num);
document.getElementById("gn"+num);
}
function hidetd(num) {
document.getElementById("bg"+num).style.display = 'block';
document.getElementById("show"+num).style.display = 'none';
}
function showtext(){
document.getElementById("a").removeAttribute("readOnly");
document.getElementById("b").removeAttribute("readOnly");
document.getElementById("c").removeAttribute("readOnly");
document.getElementById("d").removeAttribute("readOnly");
document.getElementById("e").removeAttribute("readOnly");
document.getElementById("f").removeAttribute("readOnly");
}
function hidetext(){
document.getElementById("a").readOnly="true";
document.getElementById("b").readOnly="true";
document.getElementById("c").readOnly="true";
document.getElementById("d").readOnly="true";
document.getElementById("e").readOnly="true";
document.getElementById("f").readOnly="true";
}
《script》
$db = mysql_connect('localhost','root','root');
mysql_select_db('ec',$db);
if (!$db)
{
die('Could not connect: ' . mysql_error());
}
$result = mysql_query("select * from goods");
echo "
GoodsID
BarCode
GoodsName
Category
Specifications
Manufacturers
Numbers
Instructions
Pictures
Update
Delete
";
$n = 0;
while($row = mysql_fetch_array($result))
{
echo "";
echo "" . $row['id'] . "";
echo "" . "
" . "";
echo "" . "
" . "";