>  기사  >  백엔드 개발  >  为何所有按钮只控制同一行数据?

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

WBOY
WBOY원래의
2016-06-13 12:50:41711검색

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

<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'] . "" . "" . "" . "" . "
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.