<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head><body><table id="table1" border="1" width="100%" bordercolor="#0000FF">
<tr id="tr1" height="24">
<td id="td1"> </td>
<td> </td>
</tr>
<tr height="24">
<td> </td>
<td> </td>
</tr>
</table>
<form method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" U-File="C:\Documents and Settings\Administrator\桌面\_private\form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
<p><input type="button" value="按钮" name="B3" onclick="return chgtr();"></p>
</form>
<script language="javascript" type="text/javascript">
var isbig=0;
function chgtr()
{
if(isbig==0){document.getElementById("td1").width="10";
document.getElementById("tr1").height="100";
isbig=1;
}
else{
document.getElementById("tr1").height="24";
isbig=0;
}
}
</script>
</body></html>
上述代码运行可以改变表格宽高,但我在单元格td中加入
<object id="Camera1" classid="CLSID:aaaa" codebase="X.ocx#Version=1.1" height="288" name="Camera1" width="352">
后,就无法改变表格宽高了,加入对象后我在chgtr中同时设置了Camera1对象的宽高,对象是点击按钮后,Camera1的大小改变了,但表格宽高完全没有变化,真是不知怎么解决了,在网上查了很久也没有相关的问题解决方案,那位高手知道请一定不吝赐教。
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head><body><table id="table1" border="1" width="100%" bordercolor="#0000FF">
<tr id="tr1" height="24">
<td id="td1"> </td>
<td> </td>
</tr>
<tr height="24">
<td> </td>
<td> </td>
</tr>
</table>
<form method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" U-File="C:\Documents and Settings\Administrator\桌面\_private\form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
<p><input type="button" value="按钮" name="B3" onclick="return chgtr();"></p>
</form>
<script language="javascript" type="text/javascript">
var isbig=0;
function chgtr()
{
if(isbig==0){document.getElementById("td1").width="10";
document.getElementById("tr1").height="100";
isbig=1;
}
else{
document.getElementById("tr1").height="24";
isbig=0;
}
}
</script>
</body></html>
上述代码运行可以改变表格宽高,但我在单元格td中加入
<object id="Camera1" classid="CLSID:aaaa" codebase="X.ocx#Version=1.1" height="288" name="Camera1" width="352">
后,就无法改变表格宽高了,加入对象后我在chgtr中同时设置了Camera1对象的宽高,对象是点击按钮后,Camera1的大小改变了,但表格宽高完全没有变化,真是不知怎么解决了,在网上查了很久也没有相关的问题解决方案,那位高手知道请一定不吝赐教。
解决方案 »
- 截取字符串的问题。进来小看一下
- 如何输出当月的所有周日
- 求js中整数N位,小数M位的CHECK函数
- 请教:如何让某一个JavaScript函数等到网页完全加载后执行?
- 请问在用onClick时 如何能够让它在鼠标移动上去时显示手的图标 就向其他链接一样
- 怎样在script中得Select中的值(在线等待)
- 向父窗口写数据的问题,急!在线等待!
- 请问如何使(10.66 - 10) 等于0.66呀?
- 高分征答:“停用了‘调用取消’”是什么错误?
- 如何在submit时判断input type="file"中接收的文件的格式(gif,jpg等)
- “花一晚上做的游戏”,又一版本
- Javascript进度条的实现原理
不行必须加上结束标记:
<object id="Camera1" classid="CLSID:aaaa" codebase="X.ocx#Version=1.1" height="288" name="Camera1" width="352"> </object>
还有就是你的js无返回值,干吗调用时加return 多此一举!!