请各位大虾支个招! 为什么每次都会告诉我“缺少对象”阿?:( 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 太乱了,改写了一下。先试试<?phpinclude "common.inc.php";echo <<< SCRIPT<script LANGUAGE=JavaScript>with (document){ write("<STYLE TYPE='text/css'>"); write(".gen1(visibility:hidden)"); write("</STYLE>");}function initItq(){ divColl = document.all.tags('DIV'); for (i=0; i<divColl.length; i++) { whichEl = divColl(i); if (whichEl.className == 'gen1') whichEl.style.visibility = 'hidden'; }}SCRIPT;$typeResult1=pg_exec($PG_CONN,"select * from movietype where mtype = '1';");$count1=pg_numrows($typeResult1); echo "count1 = $count1;\n";echo "var type1=new Array();\n"; for($i=0;$i<$count1;$i++){ $arrname1=pg_fetch_array($typeResult1,$i); $type1[$i] = $arrname1["mname"]; echo "type1[$i] ='a$i';\n"; $tmpname1 = $arrname1["mname"]; $typeResult12=pg_exec($PG_CONN,"select * from movietype where mtype = '2' and type1 = '$tmpname1';"); $count12=pg_numrows($typeResult12); $count2[$i] = $count12 ; for($j=0;$j<$count12;$j++) { $arrname12=pg_fetch_array($typeResult12,$j); $type2[$i][$j] = $arrname12["mname"]; } }//function showIt(i)echo <<< SCRIPTfunction showIt(i){alert('aaa'); whichE1 = eval('a' + i ); whichE1.style.visibility == 'show'); for(j = 0;j<count1 && j<>i;j++) { whichE1 = eval('a' + j ); whichE1.style.visibility == 'hidden'); }}function hiddenIt(){ for(j = 0;j<count1;j++) { whichE1 = eval('a' + j ); whichE1.style.visibility == 'hidden'); }}onload = initItq;</script>SCRIPT;?><body><table width="90%" border="0"><tr> <?phpfor ($i=0;$i<$count1;$i++){ echo <<< TD<td onMouseOver="showIt('$i')">$type1[$i] <div id='a$i' class="gen1" style="position:absolute; width:113px; height:82px; z-index:1; left: 3px; top: 33px; visibility: hidden;"> <table width="90%" border="0">TD; for ($j=0;$j<$count2[$i];$j++) { echo "<tr><td>{$type2[$i][$j]}</td></tr>"; }echo " </table> </div></td>";}?></tr></table><table width="90%" height="561" border="0"><tr> <td onMouseOver="hiddenIt()"> </td></tr></table></body> 还是不行,和原来一样的问题,缺少对象! 没有数据如何调试?你应该贴出浏览器中的代码。 网站十几个静态页面+ajax调用数据怎么样? smarty中图片缓存 不更新的问题 关于curl 求一个可用的socket实例 不是说session_start()前面不能有输出吗?我输出值后初始化,也oK啊 php_mssql.dll加载不了.怎么办,大家帮忙看看? 刚学PHP。请问PHP中 $ 是什么意思?为什么定义变量、数组等都要加上这个玩意? 谁知道这是为什么??????????????/ 我觉得我们PHP板块应该自己弄些好的工具或者教程之类,有意者入 单个项目写了一万行代码是什么水平 请问哪有免费的主页空间??? php与mysql配合使用的一个简单问题?
<?phpinclude "common.inc.php";echo <<< SCRIPT
<script LANGUAGE=JavaScript>
with (document)
{
write("<STYLE TYPE='text/css'>");
write(".gen1(visibility:hidden)");
write("</STYLE>");
}function initItq(){
divColl = document.all.tags('DIV');
for (i=0; i<divColl.length; i++) {
whichEl = divColl(i);
if (whichEl.className == 'gen1')
whichEl.style.visibility = 'hidden';
}
}
SCRIPT;$typeResult1=pg_exec($PG_CONN,"select * from movietype where mtype = '1';");
$count1=pg_numrows($typeResult1);
echo "count1 = $count1;\n";
echo "var type1=new Array();\n";
for($i=0;$i<$count1;$i++)
{
$arrname1=pg_fetch_array($typeResult1,$i);
$type1[$i] = $arrname1["mname"];
echo "type1[$i] ='a$i';\n";
$tmpname1 = $arrname1["mname"];
$typeResult12=pg_exec($PG_CONN,"select * from movietype where mtype = '2' and type1 = '$tmpname1';");
$count12=pg_numrows($typeResult12);
$count2[$i] = $count12 ;
for($j=0;$j<$count12;$j++)
{
$arrname12=pg_fetch_array($typeResult12,$j);
$type2[$i][$j] = $arrname12["mname"];
}
}//function showIt(i)
echo <<< SCRIPT
function showIt(i)
{
alert('aaa');
whichE1 = eval('a' + i );
whichE1.style.visibility == 'show');
for(j = 0;j<count1 && j<>i;j++)
{
whichE1 = eval('a' + j );
whichE1.style.visibility == 'hidden');
}
}function hiddenIt()
{
for(j = 0;j<count1;j++)
{
whichE1 = eval('a' + j );
whichE1.style.visibility == 'hidden');
}
}onload = initItq;</script>
SCRIPT;?><body>
<table width="90%" border="0">
<tr>
<?php
for ($i=0;$i<$count1;$i++){
echo <<< TD
<td onMouseOver="showIt('$i')">$type1[$i]
<div id='a$i' class="gen1" style="position:absolute; width:113px; height:82px; z-index:1; left: 3px; top: 33px; visibility: hidden;">
<table width="90%" border="0">
TD;
for ($j=0;$j<$count2[$i];$j++) {
echo "<tr><td>{$type2[$i][$j]}</td></tr>";
}
echo "
</table>
</div>
</td>";
}
?>
</tr>
</table>
<table width="90%" height="561" border="0">
<tr>
<td onMouseOver="hiddenIt()"> </td>
</tr>
</table>
</body>
你应该贴出浏览器中的代码。