ITeye博客

JAVASCRIPT

共 51 篇文章

Fantastic Bouncy Effect using jQuery/JavaScript

文章源自:http://viralpatel.net/blogs/jquery-bounce-effect-bounce-html-js/ Fantastic Bouncy Effect using jQuery/JavaScript Our Goal will be to create a HTML page that has 4 boxes (DIVs). Clicking each of these boxes will bounce them is a particular direction. We can control the direction as well as the …

2013-05-27 17:21 · JAVASCRIPT

Dynamically Add/Remove rows in HTML table using JavaScript

文章源自:http://viralpatel.net/blogs/dynamically-add-remove-rows-in-html-table-using-javascript/ Dynamically Add/Remove rows in HTML table using JavaScript A good web design involves the better user interaction and ability to fetch the data in a better way. For fetching user data, you may have to creat…

2013-05-27 17:21 · JAVASCRIPT

Dynamically add button, textbox, input, radio elements in html form using JavaSc

文章源自:http://viralpatel.net/blogs/dynamic-add-textbox-input-button-radio-element-html-javascript/ Dynamically add button, textbox, input, radio elements in html form using JavaScript Adding Elements like textbox, button, radio button etc in a html form using JavaScript is very simple. JavaScript’s d…

2013-05-27 17:20 · JAVASCRIPT

How to:Set Maxlength of Textarea using jQuery/JavaScript

文章源自:http://viralpatel.net/blogs/set-maxlength-of-textarea-input-using-jquery-javascript/ How to:Set Maxlength of Textarea using jQuery/JavaScript Update: The maxlength plugin is now managed at GitHub. Please contribute to make this plugin more awesome. GitHub: https://github.com/viralpatel/jquery.…

2013-05-24 16:38 · JAVASCRIPT

Dynamic combobox-listbox-drop-down using javascript

文章源自:http://viralpatel.net/blogs/dynamic-combobox-listbox-drop-down-using-javascript/ Dynamic combobox-listbox-drop-down using javascript Want to populate dynamically combobox-listbox-drop-down using javascript? Let us see a very simple script to do this. First let us see createElement() of documen…

2013-05-24 16:35 · JAVASCRIPT

Creating orkut style status update div-textbox using jQuery

文章源自:http://viralpatel.net/blogs/creating-orkut-style-status-update-div-textbox-using-jquery/ Creating orkut style status update div-textbox using jQuery You must have seen orkut style status update box where in the details can be modified by clicking on it. Once user click the details, details get…

2013-05-24 16:28 · JAVASCRIPT

Setting opacity of html element using Javascript

文章源自:http://viralpatel.net/blogs/setting-opacity-of-html-element-using-javascript/ Setting opacity of html element using Javascript You must have seen the blur effect of html elements like table, div where the opacity of these elements are slowly made to transparent or opaque. This can be acheived …

2013-05-24 16:10 · JAVASCRIPT

21 JavaScript Tips and Tricks for JavaScript Developers

文章源自:http://viralpatel.net/blogs/javascript-tips-tricks/ 21 JavaScript Tips and Tricks for JavaScript Developers If you are doing lot of JavaScript programming, you might find below list of code snippets very useful. Keep it handy (bookmark it) and save it for future reference. Here are 20 very use…

2013-05-24 09:42 · JAVASCRIPT

zepto tap “点透”研究

文章源自:http://blog.youyo.name/archives/zepto-tap-click-through-research.html zepto tap “点透”研究 在使用zepto框架的tap来移动设备浏览器内的点击事件,来规避click事件的延迟响应时,有可能出现点透的情况,下面是一个例子: 先看看zepto RC1版本的tap模拟事件的实现方法: ;(function($){ var touch = {}, touchTimeout function parentIfText(node){ return 'tagName' in node ? node : node.…

2013-05-10 16:19 · JAVASCRIPT

Javascript编程风格

Douglas Crockford 是 Javascript 权威,Json 格式就是他的发明。 去年 11 月他有一个演讲( Youtube ),谈到了好的 Javascript 编程风格是什么。 我非常推荐这个演讲,它不仅有助于学习 Javascript,而且能让你心情舒畅,因为 Crockford 讲得很幽默,时不时让听众会心一笑。 下面,我根据这个演讲和 Crockford 编写的 代码规范 ,总结一下"Javascript 编程风格"。 所谓"编程风格"(programming style),指的是编写代码的样式规则。不同的程序员,往往有不同的编程风格。 有人说,编译器的规范叫做"…

2013-01-30 10:03 · JAVASCRIPT

JS1.8.5新增特性之Object.create

Object.create Object.create(proto [, propertiesObject ]) 通过指定的原型对象和属性创建一个新的对象. proto:原型对象 propertiesObject:可选属性,也是可配置的,如下: var obj = Object.create({}, {'a':{'value': 1, 'writable': false, 'enumerable': false, 'configurable': false}}); 其中,第二个参数中, 是一个较为特殊的为obj添加属性的方式;其中四个值所代表的含义分别为: value: 表示a 的属性值; …

2012-12-06 11:23 · JAVASCRIPT