把重点放在师 [英] setting focus on division

查看:45
本文介绍了把重点放在师的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




以下代码非常好用,并且在

当前文档中包含yahoo.com html,但是我想修改它并且调用它为

''任何''html:

< html>

< head>

< title> geturl< / title>

< script type =" text / javascript">

function getURL(ele,str){

var di = document.getElementById(ele);

//专注于di ??

document.write(''< object data =" ;''+ str +

''" type =" text / html" width = 800 height = 500>''+

''替代文字< /对象>'');

};

< / script>

< / head>

< body>

< div id =" googel"> google html< / div>

< div id =" yahoo"> yahoo html< / div>

< div id =''anyhtml''>

html是:

&l t; script language =" javascript" type =" text / javascript">

getURL(''anyhtml'',''http://www.yahoo.com'');

< ; / script>

< / div>

< / body>

< / html>

谢谢

Michael

Hi,

the following code works very nicely and includes yahoo.com html in the
current document , however I would like to modify it and invoke it for
''any'' html:
<html>
<head>
<title>geturl</title>
<script type="text/javascript">
function getURL(ele,str){
var di = document.getElementById(ele);
// focus on di here ??
document.write(''<object data="'' + str +
''" type="text/html" width=800 height=500>'' +
''alternative text</object>'');
};
</script>
</head>
<body>
<div id="googel">google html </div>
<div id="yahoo">yahoo html</div>
<div id=''anyhtml''>
html is :
<script language="javascript" type="text/javascript">
getURL(''anyhtml'',''http://www.yahoo.com'');
</script>
</div>
</body>
</html>

thanks
Michael

推荐答案

< mx*@yahoo.com>在消息中写道

news:11 ********************** @ z14g2000cwz.googlegr oups.com ...
<mx*@yahoo.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...


以下代码工作得非常好,并且在当前文档中包含yahoo.com html,但是我想修改它并调用它来实现
''any''html:
< html>
< head>
< title> geturl< / title>
< script type =" text / javascript" ;>
函数getURL(ele,str){
var di = document.getElementById(ele);
//专注于di ??
document.write(' '< object data ="''+ str +
''" type =" text / html" width = 800 height = 500>''+
''替代文字< / object> ;'');
};
< / script>
< / head>
< body>
< div id =" googel" > google html< / div>
< div id =" yahoo"> yahoo html< / div>
< div id =''anyhtml''>
HTML是:
< script language =" javascript" type =" text / javascript">
getURL(''anyhtml'',''http://www.yahoo.com'');
< / script>
< / div>
< / body>
< / html>

谢谢
Michael
Hi,

the following code works very nicely and includes yahoo.com html in the
current document , however I would like to modify it and invoke it for
''any'' html:
<html>
<head>
<title>geturl</title>
<script type="text/javascript">
function getURL(ele,str){
var di = document.getElementById(ele);
// focus on di here ??
document.write(''<object data="'' + str +
''" type="text/html" width=800 height=500>'' +
''alternative text</object>'');
};
</script>
</head>
<body>
<div id="googel">google html </div>
<div id="yahoo">yahoo html</div>
<div id=''anyhtml''>
html is :
<script language="javascript" type="text/javascript">
getURL(''anyhtml'',''http://www.yahoo.com'');
</script>
</div>
</body>
</html>

thanks
Michael




目前尚不清楚(至少对我来说)你想做什么。


你能说出你的目标而不管你的代码吗?



It''s not clear (at least to me) what you are trying to do.

Could you state your goal irrespective of your code?


目标是显示一个网站列表,如果选择显示(

包括)html:


1- click在这里看google.com

2-点击这里查看yahoo.com

3-点击这里查看microsoft.com

< div id =''anyhtml''>

包含代码到这里

< / div>

谢谢

Michael

the objective is display a list of websites and if selected display (
include) the html :

1- click here to see google.com
2- click here to see yahoo.com
3- click here to see microsoft.com
<div id=''anyhtml''>
inclusiion code goes here
</div>
thanks
Michael


< mx*@yahoo.com>在消息中写道

news:11 ********************* @ f14g2000cwb.googlegro ups.com ...
<mx*@yahoo.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
目标是显示一个网站列表,如果选择显示(
包括)html:

1-点击这里查看google.com
2-点击这里看到yahoo.com
3-点击这里查看microsoft.com
< div id =''anyhtml''>
包含代码到这里
< / div> ;
谢谢
Michael
the objective is display a list of websites and if selected display (
include) the html :

1- click here to see google.com
2- click here to see yahoo.com
3- click here to see microsoft.com
<div id=''anyhtml''>
inclusiion code goes here
</div>
thanks
Michael




您想显示网页还是网页的HTML(来源)?


这是一个仅限IE的iframe吗?


这里有些东西但不是你想要的东西:

< html>

< head>

< title> geturl< / title>

<脚本类型=" text / javascript">

函数getURL(网址){

var di = document.getElementById(" anyhtml");

document.write("< object data =''&& quot; + url +"''type =''text / html''width =''800''

height ='''500''>替代文字< / object>" );

}

< / script>

< / head>

< body>

< div id =" google" onclick =" getURL(''http://www.google.com'')"> google html< / div>

< br>< br>

< div id =" yahoo" onclick =" getURL('''http://www.yahoo.com'')"> yahoo html< / div>

< br>< br>

< div id =" anyhtml"> html是:< / div>

< / body>

< / html>



Do you want to display the Web page or the Web page''s HTML (source)?

Is an IE-only iframe out of the qestion?

Here''s something but not what you want:

<html>
<head>
<title>geturl</title>
<script type="text/javascript">
function getURL(url){
var di = document.getElementById("anyhtml");
document.write("<object data=''" + url + "'' type=''text/html'' width=''800''
height=''500''>alternative text</object>");
}
</script>
</head>
<body>
<div id="google" onclick="getURL(''http://www.google.com'')">google html</div>
<br><br>
<div id="yahoo" onclick="getURL(''http://www.yahoo.com'')">yahoo html</div>
<br><br>
<div id="anyhtml">html is :</div>
</body>
</html>


这篇关于把重点放在师的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆