# Chrome Console Test
##### [source : https://jsfiddle.net/softm/7ca1z2sf/ ](https://jsfiddle.net/softm/7ca1z2sf/)
```html
Console Test
Open console window for test.
``` ```css h3,p,button{font-family:Helvetica} p{font-size:12px} button{display:block; margin-top:5px} ``` ```javascript // define button handler var handler = { printfStyle: function() { console.log("name: %s, value: %dwon", "Melon", 8000); console.log("buttons: %o", $("button")); }, byType: function() { console.info("info msg"); console.warn("warning msg"); console.error("error msg"); }, assert: function() { console.assert(1 === 0, "1 must be 1."); }, trace: function() { console.trace(); }, group: function() { console.group(); console.log("A"); console.log("B"); console.log("C"); console.groupEnd(); }, groupCollapsed: function() { console.groupCollapsed("groupA"); console.log("A"); console.log("B"); console.log("C"); console.groupEnd(); }, profile: function() { console.profile("x"); console.profile("y"); var s = "Check the Profiles Panel after test."; for (var i = 0; i < 10000000; i++) { s += "test"; if (i === 50000) { console.profileEnd("x"); } } console.profileEnd("y"); }, time: function() { console.time("timerA"); setTimeout(function() { console.timeEnd("timerA"); }, 100); } }; // event binding for test $("button").click(function() { var name = $(this).text(); console.log("[%s]", name); handler[name](); }); ```'web' 카테고리의 다른 글
https 위험한 사이트 등록해제 (0) | 2020.01.16 |
---|---|
URL Protocal (프로토콜) (0) | 2019.08.26 |
<a href mailto: 메일 발송 팝업 링크 (0) | 2019.07.29 |
URI, URL, URN (0) | 2019.07.16 |
행정용어표준사전 (0) | 2019.07.16 |
댓글