早上突然看到CSS里面的text-decoration属性的时候,发现blink仅有的火狐浏览器都不支持了.于是想使用js来实现这一效果.

 <script type="text/javascript">
var i = 0;
function getColor(){
i++;
switch(i){
case 1: return "#FF0000";
case 2: return "#FF6600";
case 3: return "#3366CC";
default: return "#000000";
}
}
function colorful(){
var o = document.getElementById("active");
o.style.color = getColor();
if(i==3){
i=0;
}
setTimeout("colorful()",1000);
}
colorful();
</script>

可是看着自己的代码感觉自己写的还是很low.于是在网上查找JS如何封装?于是进行一番深入学习.

1.定义js类

js并不是一种面向对象的语言,没有提供对类的支持.因此,我们不能像传统的语言那样使用class来定义类,但是我们可以使用js的闭包封装机制来实现js类,我们来封装一个简单的shape类:

代码如下:

 <script type="text/javascript">
/*
我们定义两个方法show和init,需要注意的是这里使用this来声明,而不是var.因为var使用来定义私有方法的.
*/
function BaseClass(){
this.show = function(){
alert("BaseClass show");
}
this.init = function(){
alert("BaseClass init");
}
}
/*
现在类写好了,我们写个js来测试一下,看看看结果是不是跟我们想想的一样?
*/
function test(){
var s = new BaseClass();
s.init();
s.show();
}
</script>

效果截图:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAASQAAAC7CAIAAABD3HSZAAAKtElEQVR4nO3cT08b1x7G8Xk5jojEG3CTtAuaHaBI7qLiBUzXJNnFV4SNqe35dw4VujRRc9O9LdGIVI1alaC7aGnIrZMiULZXSol1S9Iu0ixyF2MPY3sM4+H4eGb4foQS4/EzmNH8NOOxeQwhpOsJxxWuJz0hHU84rvCE9IR0XOF4whPS9aTjCtcTQkjXk7bruZ4kSJDgSEFDSum4olqzpJRSSst265bt365btmW7/u1qzXJcT0rpenKlWnM9SZAgwZGChu14wTLb8TwhhT+1rhBCekLajue4wl9R8ODwbYIECcYJGtWa5QkppbQdr9adWst2g6mtW7bteFJKIWS1ZjmekFI6niBIkOBIQcNfZtmuv8xxPdvxhJBC+lPrSSk9IS3b9VfkerJuO52pJUiQYOxg5zVb3bJFdxAt2+lOsBNMbd2yg8NltW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UTJgAtmDABaMGECUALJkwAWjBhAtDKYsIcGzs3Nzc36PYDkJXZ2dmxsbGXNGH+efKjc+PjGgCHnPHx8Y8/vvSSJkx3IGU5xLKJQ6hDqGUTyyHe6AqBCJQlMO2+gTtsMky7Zpjuds0wDdN2txGIQGkC00yY7g02h1DiassmhFCHUNNygtV4CESgBIFpa4pcf1qgs0BbNcN0Ly4hEIFyBKatMPUXZDum5RBCCXW15V1dRSACpQlMM2EGU2nDtHydWYG2EIhAaQL/D8Y7BE8DSVExAAAAAElFTkSuQmCC" alt="" />

看到了这个结果,其实和C#的调用方式是一样的.

到目前为止,我们学会了如何创建JS类了.其实创建JS还可以这样写.

     //第一种方法
function BaseClass(){
this.show = function(){
alert("BaseClass show");
}
this.init = function(){
alert("BaseClass init");
}
}
//第二种方法:prototype属性来定义BaseClass
BaseClass.prototype.show = function(){
alert("BaseClass show");
}
BaseClass.prototype.init = function(){
alert("BaseClass init");
}
//上面这种写法不直观,可以将所有的方法写到一起
BaseClass.prototype = function(){
show: function(){
alert("BaseClass show");
},
init:function(){
alert("BaseClass init");
}
}

javascript 文字闪烁的更多相关文章

  1. HTML JS文字闪烁实现(项目top.htm分析)

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <!-- saved from ur ...

  2. 【android】TabLayout文字闪烁问题

    安卓MD设计提供了一个非常酷炫的效果,TabLayout拿来做选项卡时非常合适的,但是在实际使用中发现22.2.1版本号的TabLayout在ViewPager滑动的时候会出现闪烁现象. 解决方法:在 ...

  3. javascript 文字大小自动适应文本框 (文字大小自动调整)

    javascript 文字大小自动适应文本框 (文字大小自动调整) TOC 思考 思考一:面积法 思考二:微调法 代码 在进行类似微博墙之类的展示页面中,经常会遇到这样的需求:在固定大小的区域放入字数 ...

  4. HTML文字闪烁

    <div id="blink">闪烁的文字</div> <script language="javascript"> fun ...

  5. JAVASCRIPT——文字出现效果练习

    写一句诗.诗的最初状态是隐藏的,效果是让诗缓慢出现,直到显示完全 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional// ...

  6. jquer文字闪烁简单实现

    arguments.callee <script type="text/javascript"> (function () { $(".usesend&quo ...

  7. JavaScript—文字自动变化为自定义颜色

    效果: JS代码: var ColorTimer; var Colorforn = 0; //颜色代码 var ColorArray = new Array("#00CCCC", ...

  8. 【转】css3实现文字闪烁,改变透明度

    <style> @-webkit-keyframes shake{ 0%{ opacity: 1; } 50%{ opacity: 0.5; } 100%{ opacity: 1; } } ...

  9. js文字颜色闪烁

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

随机推荐

  1. ioc解析

    引述:IoC(控制反转:Inverse of Control)是Spring容器的内核,AOP.声明式事务等功能在此基础上开花结果.但是IoC这个重要的概念却比较晦涩隐讳,不容易让人望文生义,这不能不 ...

  2. asp.net微信公众平台本地调试设置

    1.首先要开启内网穿透功能,我这边使用自己搭建的ngrok内网穿透服务(具体如何搭建ngrok内网穿透服务,另开一篇说) 2.开启内网穿透后,即可实现互联网访问 www.tbkmama.cn 指向 1 ...

  3. 北京Uber优步司机奖励政策(3月31日)

    滴快车单单2.5倍,注册地址:http://www.udache.com/ 如何注册Uber司机(全国版最新最详细注册流程)/月入2万/不用抢单:http://www.cnblogs.com/mfry ...

  4. 武汉ber优步司机奖励政策(1月4日~1月10日)

    滴快车单单2.5倍,注册地址:http://www.udache.com/ 如何注册Uber司机(全国版最新最详细注册流程)/月入2万/不用抢单:http://www.cnblogs.com/mfry ...

  5. 调用bash的时候出现curl command not found

    调用bash的时候出现curl command not found 解决办法: apt-get install curl

  6. 【费元星】crt 无法上传文件,总是显示盾牌表示-完美解决

    将如下内容保存到文件中,已.bat 结尾 taskkill /f /im explorer.exeattrib -s -r -h "%userprofile%\AppData\Local\i ...

  7. pthon web框架flask(二)--快速入门

    快速入门 迫切希望上手?本文提供了一个很好的 Flask 介绍.假设你已经安装 Flask, 如果还没有安装话,请浏览下 安装 . 一个最小的应用 一个最小的应用看起来像这样: from flask ...

  8. [Clr via C#读书笔记]Cp14字符字符串和文本处理

    Cp14字符字符串和文本处理 字符 System.Char结构,2个字节的Unicode,提供了大量的静态方法:可以直接强制转换成数值: 字符串 使用最频繁的类型:不可变:引用类型,在堆上分配,但是使 ...

  9. lock+Condition

    关键字 synchronized+wait/notify/notifyAll可以实现等待/通知模式,类ReentrantLock可以实现同样的功能,但需要借助Condition对象.Condition ...

  10. 在本地电脑使用远程服务器的图形界面——包括 MATLAB、PyCharm 等各种软件

    在用本地电脑连接远程服务器的时候,大部分时候只能用命令行来操作.虽然可以 在本地电脑用 PyCharm 进行远程调试.在本地电脑远程使用服务器的 Jupyter Notebook.Ubuntu 和 W ...