![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
javascript
iteye_12650
这个作者很懒,什么都没留下…
展开
-
pieces of js codes
jQuery[code="java"]$('#demo')['click'](function(){ ...});// equals to$('#demo').click(function(){ ...});[/code]------------[code="html"][/code][code="html"] 选择报告 ...2010-03-05 12:46:15 · 129 阅读 · 0 评论 -
risk of javascript undefined variable
[code="javascript"]var objFiles = [{"name": "FileA"},{"name": "FileB"}];var strHtml; //undefined$.each(objFiles, function(i, v){ strHtml += ''+v.name+'';});console.log(strHtml); //undefi...原创 2012-10-29 10:06:57 · 83 阅读 · 0 评论 -
ant script for css/js compression
[code="ant"] Working... ...原创 2012-10-05 08:40:15 · 106 阅读 · 0 评论 -
AUSPOST API DEMO
[code="php"][/code]results[code="javascript"]{"services":{"service":[{"code":"AUS_PARCEL_REGULAR","name":"Regular Parcel","price":"6.60","m原创 2012-04-23 15:41:03 · 249 阅读 · 0 评论 -
fix arabic cross_site_rss with ajaxcrud
1. change the mysql table / fields to utf8_general_ci and add a line on preheader.php mysql_query("SET NAMES utf8"); apply utf-8 for all relative php/js files.2. add tinyMCE in php page.[c...原创 2011-12-02 11:52:06 · 189 阅读 · 0 评论 -
Addthis widges wia API
[code="html"] var addthis_share = { description: "Australian bla bla", title: "Beth and Dan", width: "144", height: "108", screenshot: "http://absolute/path/img.j.原创 2011-11-22 12:13:36 · 164 阅读 · 0 评论 -
element.style.left returns NaN
Two ways to fix it.1. put the inline css style within the html element[code="java"]bla[/code][color=red]or[/color]2. use the function below[code="java"]function getStyle(el,sty...原创 2011-09-29 14:31:07 · 139 阅读 · 0 评论 -
JavaScript toFixed() Method
a built-in Javascript function to replace Math.floorhttp://www.w3schools.com/jsref/jsref_tofixed.asp原创 2011-09-29 09:59:11 · 72 阅读 · 0 评论 -
fix the jquery multiple hover animations
1. use hover or mouseenter + mouseleave2. use stop(true, true) to Stop the currently-running animation on the matched elements. (.stop( [clearQueue] [, jumpToEnd] ))[code="javascript"]$(do...2011-12-26 17:46:47 · 52 阅读 · 0 评论 -
getRandom
[前端]飞妮莫属 21:01:53 请教一下function getRandom() {this.result = [];};getRandom.prototype.init = function(max,len,array){var len = len||1,array = array||[],//排除数组r = Math.floor(Math.random(...2011-08-28 13:16:32 · 2364 阅读 · 0 评论 -
javascript正则表达式删除相邻重复字符
[code="javascript"] $(document).ready(function(){ var v='aabbc11asd你你++好'; //var reg=/(\w)\1/g; //仅数字和字母 var reg=/(.+)\1/g; var r=v.replace(reg,"$1"); // abc1asd你+好 alert(r)...2010-04-22 15:40:16 · 572 阅读 · 0 评论 -
Code Snippet - ctrl + i in javascript
[code="javascript"] var ctrlKey = false; $(document).bind('keydown',function(event){ if(event.keyCode == 17) { ctrlKey = true; } if (ctrlKey & event.keyCode == 73) { a...原创 2013-02-25 11:39:11 · 111 阅读 · 0 评论