<script>
var w=document.all.tablename.width+5;
var h=document.all.tablename.height+5;
window.resizeTo(w,h);
<script>
var w=document.all.tablename.width+5;
var h=document.all.tablename.height+5;
window.resizeTo(w,h);
<script>
var w=document.all.tablename.width+5;
var h=document.all.tablename.height+5;
window.resizeTo(w,h);
<script>
又或者用style的width和height:<script>
var w=document.all.tablename.style.width+5;
var h=document.all.tablename.style.height+5;
window.resizeTo(w,h);
<script>
行的,我试了:仅作一点点更改,如下://////////////////////////////////////////////////////<table id=tablename border=1 width="200" height="150" OnResize="resizewin(width/1+50,height/1+200)"><tr><td> </td></tr></table>
<input type=button value="增大表格" onclick="document.all.tablename.width=document.all.tablename.width/1+30;">
<script>
function resizewin(w,h){
window.resizeTo(w,h);
}
</script>
行的,如下:
<html><head></head><body><table id=tablename border=1 width="200" height="150" OnResize="window.resizeTo(width/1+50,height/1+200)"><tr><td> </td></tr></table>
<input type=button value="增大表格" onclick="document.all.tablename.width=document.all.tablename.width/1+30;"></body></html>
现在 给分 就要结贴 了 就不能看你在发的了
试试这样行不?<body onload="window.resizeTo(document.all.tablename.width/1,document.all.tablename.height/1)">
也没试过的,不知行不行!#!·#
试了,行的
<html><head></head><body onload="window.resizeTo(document.all.tablename.width/1,document.all.tablename.height/1)"><table id=tablename border=1 width="200" height="150" OnResize="window.resizeTo(width/1+50,height/1+200)"><tr><td> </td></tr></table>
<input type=button value="增大表格" onclick="document.all.tablename.width=document.all.tablename.width/1+30;"></body></html>