JavaScript 地震特效
作者:bea
<html> <body> <script language="JavaScript"> function surfto(form) { var myindex=form.select1.selectedIndex if (form.select1.options[myindex].value != null) { parent.main.location.href=form.select1.options[myindex].value;
<html>
<body>
<script language="JavaScript">
function surfto(form) {
var myindex=form.select1.selectedIndex
if (form.select1.options[myindex].value != null) {
parent.main.location.href=form.select1.options[myindex].value;
} }
</script> //这段JS代码意为当前页面的浏览器地震//
<script language="JavaScript">
function shake(n) {
if (window.top.moveBy) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
window.top.moveBy(0,i);
window.top.moveBy(i,0);
window.top.moveBy(0,-i);
window.top.moveBy(-i,0);
} } }
alert("呀~~地震啦!没~~吓坏吧?^_*"); //这里设定地震后弹出的嬉戏性文字(据需随意)//
}
</script>
<script language="JavaScript">
function moyamoya(htmlfile) {
parent.main.location.href=htmlfile;
}
</script>
<a onclick="shake(10)" href="#">点我看看呀~~:-)</a>
</body>
</html>
[Ctrl+A 全选 注:
如需引入外部Js需刷新才能执行]
有用 | 无用
猜你喜欢
您可能感兴趣的文章:
- javascript &&和||运算法的另类使用技巧
- JavaScript 字符串操作的几种常见方法
- javascript showModalDialog 多层模态窗口实现页面提交及刷新的代码
- JavaScript 闭包在封装函数时的简单分析
- extJs 文本框后面加上说明文字+下拉列表选中值后触发事件
- Javascript 复制数组实现代码
- js setattribute批量设置css样式
- Javascript 二维数组
- isArray()函数(JavaScript中对象类型判断的几种方法)
- javascript 加入收藏、设为首页(IE,firefox兼容)
- Exitjs获取DataView中图片文件名
- 用javascript实现jquery的document.ready功能的实现代码
- 网页中的图片的处理方法与代码
- js 动态选中下拉框
- js 对联广告、漂浮广告封装类(IE,FF,Opera,Safari,Chrome
- JS在IE和FF下attachEvent,addEventListener学习笔记
- JS小框架 fly javascript framework
- JS 拖动效果实现代码 比较简单
- jquery.ui.progressbar 中文文档