var curfontsize=10; 
  var curlineheight=18; 
  function turnsmall(){     if(curfontsize>10){ 
  window.fram1name.document.body.style.fontSize=(--curfontsize)+"pt"; 
  window.fram1name.document.body.style.lineHeight=(--curlineheight)+"pt";
 // window.fram1name.document.body.style("frame1").style.lineHeight=(--curlineheight)+"pt"; 
   } 

  function turnbig(){ 
   if(curfontsize<28){ 
  window.fram1name.document.body.style.fontSize=(++curfontsize)+"pt"; 
  //document.body.style.fontSize=(++curfontsize)+"pt"; 
  window.fram1name.document.body.style.lineHeight=(++curlineheight)+"pt";
  //window.fram1name.document.body.style("frame1").style.lineHeight=(++curlineheight)+"pt";
  //document.body.style("frame1").style.lineHeight=(++curlineheight)+"pt";  
   } 
} 以上不能改变以下代码就是这个帖子
http://topic.csdn.net/u/20101227/15/d314051c-c44a-49dd-bc91-883655668240.html生成的表格中内容字体的大小,这个为何?写得不对吗?是表格无法缩放后导致的吗?

解决方案 »

  1.   

    楼主:不能调字体,能不能跟内容加个span标签,在来控制字体大小。
      

  2.   

    顺便问一下怎么调文本的段落和字体,看以下代码,如何让txts中cur_name值居中,控制combine(y)返回的值的字体大小和行间距呢?
    function changetopic()
       {
         cur_item=”country“
         x=data.getElementsByTagName(cur_item);
         if (x.length>0)
         {
         y=x[0];
         txts=cur_name+"<br/>"+combine(y);
         window.fram1name.document.body.innerHTML=txts
         }else{
              alert("没有内容!")
         }
        }
      

  3.   

    不能调整就在td里面叫div来操作,就可以调整了,想调整最外面的td那么就要操作表格了
      

  4.   

    txts=&lt+"h1 style=text-align:center"+&gt+cur_name+lt+"/h1"+&gt+"<br/>"+combine(y);
    txts="<h1 style=text-aglin:center>"+cur_name"</h1></br>"+combine(y);
    以上是不是写错了为何不显示了?