摘要:一、JS的且运算记得最开始看到window.console&&console.log(123),当时知道能起什么作用但是没有深入研究,最近在研究后总算弄明白了。要理解这个,首先得明白三个知识点第一:短路原则这个大家都非常清楚的了,在做且运算的时候,“同真才真,一假则假”,比如true&&true==...
阅读全文
随笔分类 - javascript
摘要:以下的DEMO直接摘自官网的首页。Formatting datesmoment().format('MMMM Do YYYY, h:mm:ss a');moment().format('dddd');moment().format("MMM Do YY");moment().format('YYYY [escaped] YYYY');moment().format();输出April 17th 2013, 4:06:00 pmWednesdayApr 17th 132013 escaped 20132013-04-17T16:
阅读全文
摘要:在FF下,切换到中文输入法,再输入中文,是不能立即自动查询,需要按下其他按键,比如CTRL,后来,通过修改源代码即可修复这个问题。找到以下代码:.bind( "blur.autocomplete", function( event ) { if ( self.options.disabled ) { return; } clearTimeout( self.searching ); // clicks on the menu (or a ...
阅读全文