| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1052 人关注过本帖
标题:child window 怎样调动parent window中定义的style
只看楼主 加入收藏
lszzsw
Rank: 1
等 级:新手上路
帖 子:26
专家分:0
注 册:2006-4-26
收藏
 问题点数:0 回复次数:2 
child window 怎样调动parent window中定义的style
正如大家熟悉的那样,child window中可引用parent window中定义的变量:var ??=parent.**;
function 亦如此,但style能不能引用,将如何引用?特此请教!
搜索更多相关主题的帖子: parent child window 定义 style 
2006-06-04 13:49
linuxpluto
Rank: 4
等 级:贵宾
威 望:13
帖 子:889
专家分:23
注 册:2005-8-14
收藏
得分:0 

window对象都能引用,难道style不能引用吗?

parent.document....


吃的比猪还差,干的比驴还累,起的比鸡还早,睡得比小姐还晚,挣得比民工还少,看起来比谁都好——苦命的人.人生短短几十年,不要给自己留下了什么遗憾,想笑就笑,想哭就哭,该爱的时候就去爱,无谓压抑自己
2006-06-04 21:07
lszzsw
Rank: 1
等 级:新手上路
帖 子:26
专家分:0
注 册:2006-4-26
收藏
得分:0 
楼上的同仁能否说具体点,请参照下面的.
"<style>
.tryCall{color:red;}
</style>
<body onload=createTable(child)>
<iframe id=child></iframe>
</body>
function createTable(win){
with(win){
var new_tab=document.createElement('table');
var tbody=document.createElement('tbody');
var new_tr=document.createElement('tr');
var new_td=document.createElement('td');
tab_div.appendChild(new_tab);
new_tab.appendChild(tbody);
tbody.appendChild(new_tr);
new_tr.appendChild(new_td);
new_td.className=在这里怎样引用前面的 tryCall样式?????
}

}"
2006-06-05 22:27
快速回复:child window 怎样调动parent window中定义的style
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.021830 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved