Maison  >  Article  >  développement back-end  >  为何所有按钮只控制同一行数据?

为何所有按钮只控制同一行数据?

WBOY
WBOYoriginal
2016-06-13 12:50:41715parcourir

为啥所有按钮只控制同一行数据???
为啥所有按钮只控制同一行数据?应该怎么解决啊。

<br>
nbsp;html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><br>
<br>
<br>
<meta><br>
<title>Insert title here</title><br>
<script><br />
         function showtd(num) {            <br />
             document.getElementById("bg"+num).style.display = "none";<br />
             document.getElementById("show"+num).style.display = "block";<br />
             document.getElementById("ba"+num);<br />
             document.getElementById("gn"+num);<br />
         }<br />
         function hidetd(num) {<br />
             document.getElementById("bg"+num).style.display = 'block';<br />
             document.getElementById("show"+num).style.display = 'none';<br />
         }<br />
		function showtext(){<br />
			document.getElementById("a").removeAttribute("readOnly");<br />
			document.getElementById("b").removeAttribute("readOnly");<br />
			document.getElementById("c").removeAttribute("readOnly");<br />
			document.getElementById("d").removeAttribute("readOnly");<br />
			document.getElementById("e").removeAttribute("readOnly");<br />
			document.getElementById("f").removeAttribute("readOnly");<br />
			}<br />
		function hidetext(){<br />
			document.getElementById("a").readOnly="true";<br />
			document.getElementById("b").readOnly="true";<br />
			document.getElementById("c").readOnly="true";<br />
			document.getElementById("d").readOnly="true";<br />
			document.getElementById("e").readOnly="true";<br />
			document.getElementById("f").readOnly="true";<br />
			}<br />
<br />
     </script><br>
<br>
<br>
	


$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 "











";
$n = 0;
while($row = mysql_fetch_array($result))
  {
  echo "";
  echo "";
  echo "";
  echo "";
GoodsID BarCode GoodsName Category Specifications Manufacturers Numbers Instructions Pictures Update Delete
" . $row['id'] . "" . "" . "" . "" . "
Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn