闻心阁

一蓑烟雨看苍生,半壶浊酒笑红尘

Inject jQuery into Any Webpage

2016-10-08 约 1 分钟读完 搬砖秘籍

Even MVVM framework is more and more popular in the web front developments, but the strength of jQuery cannot be replaceable. Sometimes, we need the jQuery’s useful APIs to achieve some complex actions, but many webpages give up jQuery, so some skills is needed to inject the jQuery into the webpages which had abandon the jQuery library.

继续阅读

ES6 Tips in Chrome (2016-08-08)

2016-08-08 约 1 分钟读完 搬砖秘籍
Nowadays ES6 is more and more popular in front end development, so I plan to learn and practice it via Chrome browser. Why is Chrome? Because it can support most of ES6 features(Nearly 97% until 2016-08-08), but I also find a few method that it can’t support. .at() method .padStart() method .padEnd() method .values() method If I find other features not support in Chrome, I would write it here again.

jQuery $.ajax Method Ignored the Undefined Values

2016-08-07 约 1 分钟读完 搬砖秘籍
Recently, I used jQuery to get the data from the server client via $.ajax method. As we known that, we should send the request with some parameters. The code as follow. $(document).ready(function(){ $.ajax({ url:'http://127.0.0.1/jq-undefined.php', data:{ para1 : 1, para2 : 2, para3 : undefined }, success:function(data){ alert(data); }, }); }); According to Chrome DevTools, I get the result: Yep, jQuery is smart, it can ignore the undefined values and avoid a lot of server errors. 继续阅读