一、用htc实现。 eye.htc function example(){this.blur();} a {behavior:url(eye.htc)} 二、 a {link:expression(this.onfocus=this.blur)} blueidea [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]JavaScript教程/参考手册 JavaScript热搜 vue2.0 移动端实现下拉刷新和上拉加载更多的示例解决vue-router中的query动态传参问题解决使用vue.js路由后失效的问题微信小程序实现换肤功能JS中touchstart事件与click事...
用两个div嵌套链接文字,最外面的div设置 overflow:hidden,并用js动态控制它的width,实现伸展与收缩。 新闻轮显的demo a { font-size:14px} #box { width:400px; height:20px; overflow:hidden;} #title { color:#000;width:400px; height:20px;font-size:14px;line-height:18px; /*background-color:#FF0000*/} var handle; var handle2; var boxW=0; var titleNum=0; function init(){ var newsTitles = "快乐笛子的博...
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
超级链接 linkColor="#ff0000"; linkFontSize="18px"; linkFontWeight="normal"; linkTextDecoration="none"; vlinkColor="#ff0000"; vlinkFontSize="18px"; vlinkFontWeight="normal"; vlinkTextDecoration="none"; alinkColor="#3c5a9a"; alinkFontSize="20px"; alinkFontWeight="bold"; alinkTextDecoration="underline"; var linkStyle=document.createStyleSheet(); linkStyle.cssText="A:link{CO...
var strVariable = ""; strVariable = strVariable.link("http://www.gxlcms.com"); document.write(strVariable) JavaScript教程/参考手册 JavaScript热搜 vue2.0 移动端实现下拉刷新和上拉加载更多的示例解决vue-router中的query动态传参问题解决使用vue.js路由后失效的问题微信小程序实现换肤功能JS中touchstart事件与click事件冲突的解决方法完美解决axios在ie下的兼容性问题在vue项目中引入highcharts图表的方法(...
这么一个简单的效果就花了偶两个多小时,失败。。。看来还是写的太少,眼高手低!!以后还要多动手写,不能只知道实现方法就pass了废话少说,代码如下(这个可是结构,样式,行为相分离哦): new document *{margin:0px;padding:0px;} #menu{ font-size:12px; list-style-type:none; width:100px;text-align:center; } #m1,#m2,#m3,#m4{ border:1px solid #666; height:20px;line-height:20px; background:#ccc...
利用dom的树可以不用id就可以修改相关内容,如修改每个超链接前面的文本框的值。 + + + [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]这里主要使用previousSibling属性访问前一个节点,从而达到改变前一个文本框值的效果.
其实这个也是曾经让俺头疼的一个问题,当时怎么都找不到原因,后来才知道这是IE6浏览器的一个bug,不过后来也没有在注意过这个问题。 今日在蓝色经典发现有网友遇到了同样的问题,而且下面的回复者似乎也都不太清楚是什么造成,感觉还是有很多朋友会遇到这种问题的。于是在此对此bug出现的原因解释下下希望对各位有用! 造成GIF停止的代码语句一般都是如下形式: 代码如下:超链接 如果你的gif突然停止,请检查您的代码是...
点击复制UBB标签 function copyinfo() { var obj = document.getElementById("ubbinfo"); if (obj!=null) { var txt = document.body.createTextRange(); txt.moveToElementText(obj); txt.execCommand("Copy"); alert('软件信息已复制,直接粘贴即可。'); } else { alert('复制错误,请联系管理员!'); } } 在这里修改你需要复制的软件信息: [size=3][b]{SoftTitl...
浏览网站时发现这个代码,非常的不错,高度为20的,文本广告调用代码: 代码如下:var marqueeContent=new Array(); //滚动主题 marqueeContent[0]='全站资料下载站'; marqueeContent[1]='Google AdSense'; marqueeContent[2]='火狐浏览器下载'; marqueeContent[3]='全站广告位招租'; marqueeContent[4]='全站资料下载站'; marqueeContent[5]='Google AdSense'; marqueeContent[6]='全站资料下载站'; var m...
function copyToClipBoard(){ var clipBoardContent=""; clipBoardContent+=document.title; clipBoardContent+=""; clipBoardContent+=this.location.href; window.clipboardData.setData("Text",clipBoardContent); alert("复制成功,请粘贴到您的QQ/MSN上推荐给您的好友"); } document.body.oncopy = function () { setTimeout( function () { var text = clipboardData.getData("text"); if (text) { text = te...
Marquee.js 参数说明: demo 字幕区域标签(div)的ID; demo1/demo2 显示内容标签(div或td)的ID demo1为原始内容,demo2是它的拷贝; direction 字幕方向(up,down,left,right) ; delay 字幕播放的延迟时间(毫秒); step 字幕播放的步长(即pix,步长越小,如step=1,滚动越平滑) function Marquee (demo, demo1, demo2, direction, delay, step) { direction = direction.toLowerCase(); if(((direction == "up" || direction =...
function S(i){return document.getElementById(i)} function copyUrl(){//复制网址 var clipBoardContent=S("downloadDirect").href; try{ window.clipboardData.setData("Text",clipBoardContent); alert("复制成功!"); }catch(e){ alert("复制失败!"); } } document.onclick = function(evt){//在不是连接的位置单击时,隐藏 显示的层 var _target = evt ? evt.target : event.srcElement ; var _id = _target.id; if( _id == ""...
代码如下:function cf(flashsrc,flashwidth,flashheight,flashlink,br){ document.write(""); document.write(""); document.write(""); document.write("<div style=\"background:white;filter:alpha(opacity=0);opacity:0;position: relative;z-index:10;left:0pt;top:0pt;width:"+flashwidth+";height:"+flashheight+"px;\">"); document.write(""); document.write(""); document.write(""); document.write(""); if (br=="1")...