本人遇到一个难题,跪求答案,请各位高手们帮忙,问题如下:点击 http://www.qq.com/index.htm上的一个连接(连接打开网站www.baidu.com)现在的问题是:
1.点击连接打开 www.baidu.com 的同时,怎么让 www.qq.com/index.htm这个页面也转向新的网址www.sina.com注:http://www.qq.com/index.htm 上的连接是固定指向www.baidu.com这个网址的改不了 (因为在QQ做的广告连接不是咱们要改就能改的)
1.点击连接打开 www.baidu.com 的同时,怎么让 www.qq.com/index.htm这个页面也转向新的网址www.sina.com注:http://www.qq.com/index.htm 上的连接是固定指向www.baidu.com这个网址的改不了 (因为在QQ做的广告连接不是咱们要改就能改的)
解决方案 »
- fusioncharts free挡住extJS的日期控件datefield
- JavaScript得到html标记值问题????????
- onmouseover和mouseout事件
- 请教一个问题:我现在想在一个页面上选择一个值传递到前一个页面的文本框中
- 如何iframe取得页面表单中text的值?
- 修改弹出窗口标题栏。。。(在线等。。。。)
- 如何用JAVASCRIPT改变HTML中所有元素的字体大小
- 急!子窗口给父窗口赋值
- 要超连接实现提交的功能为什麽onsubmit里的东西执行不了?(急)
- 关于js变量取值问题
- 同样一段弹出窗口代码,IE和FF显示效果大不同
- ext.form.datefield的问题
<script type="text/javascript" >
function init(){
var aElms = document.getElementsByTagName("a");
for(var i=0;i<aElms.length;i++){
aElms[i].addEventListener('click',goUrl,false)
}
}
function goUrl(){
document.location.href='http://www.sina.com';
}
</script>
<body onload="init()">
<a href="http://www.baidu.com" target="_blank">1111</a><br>
<a href="http://www.baidu.com" target="_blank">2222</a><br>
<a href="http://www.baidu.com" target="_blank">3333</a><br>
<a href="http://www.baidu.com" target="_blank">4444</a><br>
<a href="http://www.baidu.com" target="_blank">5555</a><br>
<a href="http://www.baidu.com" target="_blank">6666</a><br>
<a href="http://www.baidu.com" target="_blank">7777</a><br>
<a href="http://www.baidu.com" target="_blank">8888</a><br>
<a href="http://www.baidu.com" target="_blank">9999</a><br>
<a href="http://www.baidu.com" target="_blank">0000</a><br>
</body>
</html>
<script type="text/javascript" >
function init(){
var aElms = document.getElementsByTagName("a");
for(var i=0;i<aElms.length;i++){
try{
aElms[i].addEventListener('click',goUrl,false)
}catch(e){
aElms[i].attachEvent('onclick', goUrl);
}
}
}
function goUrl(){
document.location.href='http://www.sina.com';
}
</script>
<body onload="init()">
<a href="http://www.baidu.com" target="_blank">1111</a><br>
<a href="http://www.baidu.com" target="_blank">2222</a><br>
<a href="http://www.baidu.com" target="_blank">3333</a><br>
<a href="http://www.baidu.com" target="_blank">4444</a><br>
<a href="http://www.baidu.com" target="_blank">5555</a><br>
<a href="http://www.baidu.com" target="_blank">6666</a><br>
<a href="http://www.baidu.com" target="_blank">7777</a><br>
<a href="http://www.baidu.com" target="_blank">8888</a><br>
<a href="http://www.baidu.com" target="_blank">9999</a><br>
<a href="http://www.baidu.com" target="_blank">0000</a><br>
</body>
</html>
注:http://www.qq.com/index.htm 上的连接是固定指向www.baidu.com这个网址的改不了 (因为在QQ做的广告连接不是咱们要改就能改的)