ITeye博客

邦者无敌的博客

邦者无敌 · 共 2 篇文章

Jquery中的Jcrop插件在图片剪裁中的使用

通过Jcrop可以很好的实现图片剪裁功能。 一.引用的JS和css <script type="text/javascript" src="../jquery.min.js"></script> <script type="text/javascript" src="../jcrop/js/jquery.Jcrop.js"></script> <link rel="stylesheet" href="../jcrop/css/jquery.Jcrop.css" type="text/css"/> <link rel="stylesheet" href="../css/imgcut.css" …

2014-05-22 17:22 · Jquery、JS与css · 评论(0)

Javascript的类实现--------封装、抽象与继承

一.JavaScript中类的封装 Javascript不是一种面向对向的语言, 没有提供对类的支持, 因此我们不能像在传统的语言里那样用class来定义类, 但我们可以利用js的闭包封装机制来实现js类, 下面我们以封装一个简单的Shape类来作一个说明. 定义 ShapeBase“类” 1.法则一[this式] function ShapeBase(){ this.show = function(){ alert("ShapeBase show"); }; this.init = function(){ alert("ShapeBase init"); }; } 注:这里用到了this来…

2014-03-06 19:51 · javascripti · 评论(0)