저는 모든 열의 고유 값으로 데이터베이스의 클라이언트 측 테이블을 표시하려고합니다.onclick의 텍스트 상자 문제 @
: 여기에 내가 ... 코드를 "... 독특한 선택"을 하나의 텍스트 상자 여기
코드는이 값을 넣어
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
function onClick()
{
alert(document.form.thirdparty.value);
}
</script>
</head>
<body>
<p> </p>
<form name="form" method="get" >
<?php
$con=mysql_connect('localhost','root','');
mysql_select_db('database',$con);
$res = mysql_query("SELECT count(*) as count FROM tablename") or die(mysql_error());
while ($row = mysql_fetch_array($res)) {
$val=$row['count'];
} ?>
<input name="fino" type="text" id="fino" size="5" value="<?php echo $val." docs" ?>" style="border-style:hidden; color:#0083fa;" />
<table width="1474" height="270" border="0" >
<tr>
<td width="180" height="41">
<input name="Item" type="DocumentType" id="textfield5" value=" Item"size="30" /> </td>
<td width="180" height="41">
<label>
<td width="180" height="41"> <input type="text" name="textfield8" id="textfield8" style="visibility:hidden" /></td>
</label>
<label>
<td width="180" height="41"> <input type="text" name="textfield9" id="textfield9" style="visibility:hidden"/></td>
</label>
</td>
</tr>
<tr>
<td>
<?php
$a=mysql_query("select distinct language from tablename");
$c=0;
$i=1;
$x=1;
while($row = mysql_fetch_array($a))
{
$b=$row['language'];
$i=$b;
$d=mysql_query("select count(*) as count from tablename where language='$i' ");
while ($row = mysql_fetch_array($d)) {
$e=$row['count'];
$cal=round(($e/$val)*100);
}
?>
//in this textbox am using onclick function
<input type="text" size="30" style="height:<?php echo $cal.px?>"value="<?php echo "$i"." "." "." "."$e"." docs" ?>"name="language" id="textfield"onClick="onClick();" />
<?php
$i++;
$c++;
}
?> </td>
<td>
<?php
$con=mysql_connect('localhost','root','');
mysql_select_db('database',$con);
$a1=mysql_query("select distinct Subject from tablename");
$c1=0;
$i1=1;
while($row = mysql_fetch_array($a1))
{
$b1=$row['Subject'];
$i1=$b1;
$d1=mysql_query("select count(*) as count from tablename where Subject='$i1' ");
while ($row = mysql_fetch_array($d1)) {
$e1=$row['count'];
$cal1=round(($e1/$val)*100);
}
?>
<input type="text" size="30" style="height:<?php echo $cal1.px?>" value="<?php echo "$i1"." "." "." "."$e1"." docs" ?>"name="item" id="textfield2" />
<?php
$i++;
$c++;
}
?> </td>
<td>
<label>
<td> <input type="text" name="textfield12" id="textfield12" style="visibility:hidden" /></td>
</label>
<label>
<td> <input type="text" name="textfield13" id="textfield13" style="visibility:hidden" /></td>
</label>
<label>
<td> <input type="text" name="textfield14" id="textfield14" style="visibility:hidden" /></td>
</label>
<label>
<td> <input type="text" name="textfield15" id="textfield15" style="visibility:hidden" /> </td>
</label>
</form>
</td>
</tr>
</table>
<blockquote>
<p align="center"> </p>
</blockquote>
</body>
</html>
코드를 수정하려면 코드를 제공해야합니다. 여기에 자바 스크립트를 붙여 넣으십시오. –
이것은 JavaScript 문제입니다. 존재하지 않는 개체에 액세스하려고합니다. 사람들이 당신을 더 잘 도울 수 있도록 몇 가지 코드를 게시 할 수 있습니까? –
리비전 1로 되 돌리는 이유는 무엇입니까? – Nanne