document.frames['iframeName'].document.getElementById['img1'].align

解决方案 »

  1.   

    谢谢,我现在没有编辑环境,所以没办法试验。我希望能修改当前鼠标选中的图片,不知道可不可以得到。
    另外,以前以前有位 Go_Rush(阿舜)大人回答过类似的问题。
    http://expert.csdn.net/Expert/topic/1380/1380530.xml?temp=.7625238
    我照做了,却总是报错,就是这段程序:
    var win=document.frames[0].window;
       var coll=win.document.selection.createRangeCollection()
       for(var i=0;i<coll.length;i++){
          if (coll(i).tagName=="IMG") alert(coll(i).src)请帮忙看看,谢谢。
      

  2.   

    试了试,可以用以下方法得到
    var c1=document.frames("framename").document;
     for (i=0;i<c1.images.length;i++)
        c1.images[i].align='center';我还是没办法得到当前选中的图片,如果用c1.selection.createRange()也不行。谁知道呀,我很着急,谢谢啦.