js怎么实现在load后 自动点击一个链接 什么意思啊?要onload完后直接跳转?window.onload=function(){document.location.href="http://www.csdn.net/";}; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 对.onload完后直接点击这个链接.实际中不是跳转到某个页面,而是点击这个链接进行下载. 怎么弄呢? 模拟点击在IE下是会触发事件的,FF的dispatchEvent不清楚,倒不如直接onload后执行那段onclick里的JS就算了。 问题是现在没有onclick.在FF下执行什么js就能像click()一样可以点击这个链接 进行下载呢? 下载和跳转是一样滴,不用模拟click!L@_@K<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> <title>dhtml.hyperlink.autoDownload.html</title> <meta name="generator" content="editplus" /> <meta name="author" content="Gao YiXiang" /> <meta name="email" content="[email protected]" /> <meta name="keywords" content="javascript dhtml dom" /> <meta name="description" content="I love web development." /></head><body> <div id="" class=""> 其他内容!<br /> 下载内容最好是同一域名下,否则IE和FF都会自动转向! </div><br /> <a id="hlkDownload" href="http://ytcnc2.onlinedown.net/down/flashget240cn_beta4.zip">下载 快车(FlashGet) 2.0 beta4</a></body><script type="text/javascript"><!--window.onload = function(){ window.location.href = document.getElementById("hlkDownload").href;};//--></script></html> 谢谢 大家. 谢谢 yixianggao 按你的方法问题解决了. 可能是我思路不是很对 .呵呵 请教一个jquery的问题,为动态生成的元素添加对应的事件 TR onclick事件如何排除某些的td绑定事件。 javascript访问asp:TableRow 为什么无论按哪个如下的button,都会跳出i will be submit呢?谢谢。 在引用js文件中获取html页面的值 ext4中的view显示图片,如何做到横向显示? 求十个常用的正则表达式:1、只能输入英文+数字...... 应该很容易的,我不知道咋写。 捕捉鼠标位置的问题? 2>10 如何转换为10 > 2 ?如何把字符型转换为数值型? 在线! javascript空格问题 求键位随机的软键盘 js代码
L@_@K
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>dhtml.hyperlink.autoDownload.html</title>
<meta name="generator" content="editplus" />
<meta name="author" content="Gao YiXiang" />
<meta name="email" content="[email protected]" />
<meta name="keywords" content="javascript dhtml dom" />
<meta name="description" content="I love web development." />
</head>
<body>
<div id="" class="">
其他内容!<br />
下载内容最好是同一域名下,否则IE和FF都会自动转向!
</div><br />
<a id="hlkDownload" href="http://ytcnc2.onlinedown.net/down/flashget240cn_beta4.zip">下载 快车(FlashGet) 2.0 beta4</a>
</body>
<script type="text/javascript">
<!--
window.onload = function()
{
window.location.href = document.getElementById("hlkDownload").href;
};
//-->
</script>
</html>