$(function(){ //dom对象加载完成后执行 //---禁止复制、下载、右击--- 去掉注释打开该功能 /* document.oncontextmenu = function(){alert("本站内容禁止复制!"); return false; }; //禁止右键弹出上下文菜单 document.onselectstart = function(){return false;}; //禁止选择文本 document.ondragstart = function(){return false;}; //禁止鼠标在网页上拖动 document.onbeforecopy = function(){return false;}; //禁止复制 document.oncopy = document.selection.empty(); //禁止拷贝 document.onselect = document.selection.empty(); //禁止选择 */ //---设为首页--- 获取地址没做处理,以后有待修改 $(".setindex").css("cursor","pointer").click(function(){this.style.behavior='url(#default#homepage)';this.sethomepage(location.href); return false; }); //---加入收藏--- external对象中的addfavorite方法中地址一定要带http://否则不会运行 $(".addfavorite").css("cursor","pointer").click(function(){ window.external.addfavorite(location.href, document.title); return false; }); //---插入当前日期--- $(".nowdate").text(function(){ var today = new date(); var week = ["日","一","二","三","四","五","六"]; var date = "今天是:" + today.getfullyear() +"年"+ (today.getmonth()+1) +"月"+ today.getdate() +"日 星期"+ week[today.getday()]; //年、月、日、星期 return date; }); //---友情链接--- $(".ylink").css({'position':'absolute','left':'-9999px','width':'100px','height':'100px','overflow':'hidden'}) //---鼠标经过 子标签动作--- $(".nav_hover li").hover(function(){$(this).children("ul").slidetoggle("fast");},function(){$(this).children("ul").slideup("fast");}); //---鼠标经过 子标签动作--- $(".nav li").hover(function(){$(this).animate({"text-indent": "5px"}, "fast");},function(){$(this).animate({"text-indent": "0px"}, "fast");}); //---指定dom对象加图片编号--- /* addico($(".textlist .images")); function addico(myimg){ for(i=0; i<=myimg.length-1; i++){ if(i<9){myindex = "0" + ( i + 1 );}else{myindex = i + 1;}; myimg.eq(i).append("" ); }; }; */ }); //---flash播放--- function makeflash(url,width,height,xml){ document.writeln(""); document.writeln(""); document.writeln(""); document.writeln(""); }; //---flash播放--- // 适用于老版本flash生成的swf文件 /* function makeflash(url,width,height){ document.writeln(""); document.writeln(""); document.writeln(""); document.writeln(""); }; */ //---视频播放--- function makevideo(url,width,height){ document.writeln("") document.writeln(" ") document.writeln("") document.writeln("") }