调用脚本之后对齐的问题 这样可以吗?<p><td height="67">bbbbb<script src="cc.js"></script></td></p>为什么会换行我不知道等高手来解答 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 执行顺序问题,先执行了bb.js,执行完后执行 cc.js.因此,执行cc.js的时候 表格已经画好了,再写东西自然就写在后面了。把bb.js改成:document.write('<table width="760" border="1" cellspacing="0" cellpadding="0">');document.write(' <tr>');document.write(' <td height="67" id="lfecnu">bbbbb<script src="cc.js"></script></td>');document.write(' </tr>');document.write('</table>');cc.js改成:document.all.lfecnu.innerText=document.all.lfecnu.innerText+"ccc"; to sugarshop(糖果店) 我试过了,不行,但是也谢谢你的回答。to lfecnu() 你说的方法成功了。呵呵,谢谢。你能解释一下document.all.lfecnu.innerText这行语句的意思吗?尤其是all是什么意思?还有,帮忙看看这个帖子 http://community.csdn.net/Expert/topic/3767/3767042.xml document.all.elementId 表示:返回页面上id为elementId的对象 为什么是document.all.elementId 而不是document.elementId 呢 你问的问题,就像为什么1+1=2一样,赫赫。也可以这么用。document.all[elementId]。 还有,如果cc.js文件是别人已经事先写好的,那么还有解决办法吗? to Croatia(Croatia)什么时候用all,什么时候不用?这个能解释吗?我看到有时候没有用all all是一collection,后面可以跟点来引用其内部成员,但document就不是了 document是一对象,即DHTML中的Object,其成员由Attributes、Properties、Methods、Events、Collections和Behaviors等组成,像document.BODY就是document的Attribute(特性);document.bgColor就是document的property(属性);all就是document可以引用的collectioin(集合)之一,类似的collection还有forms(页面上所有表单form的集合)、images(页面上所有图片的集合)等 document.write('<table width="760" border="1" cellspacing="0" cellpadding="0">');document.write(' <tr>');document.write(' <td height="67" id="lfecnu" nowrap>bbbbb<script src="cc.js"></script></td>');document.write(' </tr>');document.write('</table>');应该可以解决了. to xjdawu(左右互搏)谢谢你的解释,你能推荐类似你解释的内容的资料吗?to goocity(健)如果把cc.js文件中的内容改成document.all.lfecnu.innerText=document.all.lfecnu.innerText+"ccc";会正常,但是如果cc.js文件不更改有没有解决办法? 我那的TD属性加了nowrap,应该不会换行的呀. 不行啊,如果cc.js文件中这么写document.write('ccccccccccccccccc'); 那么改成你的代码也不行,非得改一下cc.js文件。但是,cc.js文件如果是别人的,我无法修改,难道就没有了办法了吗? 试试用iframe控制:bb.js改成:document.write('<table width="760" border="1" cellspacing="0" cellpadding="0">');document.write(' <tr>');document.write(' <td height="67" id="lfecnu">bbbbb<iframe src="ee.htm" frameborder=0 height=15 scrolling="no" frameborder=0 marginwidth=0 marginheight=0></iframe></td>');document.write(' </tr>');document.write('</table>');cc.js不动增加一个页面:ee.htm<html><script src=cc.js></script></html> 请问如何清除登录信息 带缓冲的折叠伸缩代码效果 js验证问题 急切求助 javascript 高手 怎样设置一个按钮 按下后在生成图形 怎样获得js对象的所有方法 请帮我一下 非常感谢您 www.msn.com网站,里面注册了它的邮箱后,进入my msn的主页后,它的页面能用鼠标拉动它的任何位置。 怎样在客户端脚本中改变dropdownlist当前选中的值? javascript难道自己连画个圆圈都不行吗?一定要用 VML吗? 立即执行函数 和 回调函数 分别怎么理解? 如何清空Form内输入框、下拉框的内容或还原为默认值? 怎么去掉字符串的空格
把bb.js改成:
document.write('<table width="760" border="1" cellspacing="0" cellpadding="0">');
document.write(' <tr>');
document.write(' <td height="67" id="lfecnu">bbbbb<script src="cc.js"></script></td>');
document.write(' </tr>');
document.write('</table>');
cc.js改成:
document.all.lfecnu.innerText=document.all.lfecnu.innerText+"ccc";
我试过了,不行,但是也谢谢你的回答。to lfecnu()
你说的方法成功了。呵呵,谢谢。你能解释一下document.all.lfecnu.innerText这行语句的意思吗?尤其是all是什么意思?还有,帮忙看看这个帖子 http://community.csdn.net/Expert/topic/3767/3767042.xml
什么时候用all,什么时候不用?这个能解释吗?我看到有时候没有用all
document.BODY就是document的Attribute(特性);
document.bgColor就是document的property(属性);
all就是document可以引用的collectioin(集合)之一,类似的collection还有forms(页面上所有表单form的集合)、images(页面上所有图片的集合)等
document.write(' <tr>');
document.write(' <td height="67" id="lfecnu" nowrap>bbbbb<script src="cc.js"></script></td>');
document.write(' </tr>');
document.write('</table>');
应该可以解决了.
谢谢你的解释,你能推荐类似你解释的内容的资料吗?to goocity(健)
如果把cc.js文件中的内容改成document.all.lfecnu.innerText=document.all.lfecnu.innerText+"ccc";会正常,但是如果cc.js文件不更改有没有解决办法?
bb.js改成:
document.write('<table width="760" border="1" cellspacing="0" cellpadding="0">');
document.write(' <tr>');
document.write(' <td height="67" id="lfecnu">bbbbb<iframe src="ee.htm" frameborder=0 height=15 scrolling="no" frameborder=0 marginwidth=0 marginheight=0></iframe></td>');
document.write(' </tr>');
document.write('</table>');cc.js不动
增加一个页面:ee.htm
<html>
<script src=cc.js></script>
</html>