另一页面不固定的话那你在cui.htm写一函数,在另一不的页调用cui.htm中写的函数呀.否则另一页都不固定的话,其中内容也不知道,所以应该只有在另一页调用cui.htm中的函数吧?
cui.htm中:
<script>
function temp(str)
{
document.getElementById("div1").innerHTML=str;
}
</script>
如abc.htm的内容为:
s="任意的输出内容";
temp(s); //加此句,调用cui.htm中的temp中的函数
cui.htm中:
<script>
function temp(str)
{
document.getElementById("div1").innerHTML=str;
}
</script>
如abc.htm的内容为:
s="任意的输出内容";
temp(s); //加此句,调用cui.htm中的temp中的函数
现在我这样写:function test()
{
url = "http://localhost/s.htm?kw=beijing&pn=0";
document.write("<script src="+url+"><\/script>");
document.write("<div id='dqdiv'></div><script>show('dqdiv');<\/script>");
}
function show(obj)
{
if (typeof(s)!= 'undefined')
{
if (!s || s.length < 1) return;
alert(s);
document.getElementById(obj).innerHTML = s;
}
}
http://localhost/s.htm?kw=beijing&pn=0页面里的内容为s='内容';我在本页cur.htm调用test()函数,在firefox里能出来,IE里不行。高手们帮我看看哪儿的问题。谢谢了
wt.asp
______________________________document.write("<a href=\"default.asp\">deault.asp</a>");