javascript
éè¦ããããã¯è¬ã§ãããtitleå±æ§ã«ããã«ã®ã¿ã¤ãã«ãå ¥ã£ã¦ãªãã¦å¾®å¦ã ã¨æã£ãã®ã§ã google ã®æ¤ç´¢çµæã§ãã¿ã¤ãã«ãé·ãã¨éä¸ã§æååãããã¦ããå ´åãããã¾ãã ä¾ãã°ããã®ããã°ã®è¨äºã ã¨ããã¨ãã ããããæååãããã¦ããå ´åã¯ããªâ¦
JSONæååããªãã¸ã§ã¯ãã«å¤æãã¦ããã JSON.parse() ã使ã£ã¦ã¿ããã ããªã使ãã«ããæããã ã¨ããã®ãã JSON.parse("{hoge: 1}"); // error ãããSyntaxErrorã«ãªã*1 JSON.stringify() ãå³å¯ãªJSONæååãããããããã®ã§ã ã©ãæ¸ãã°ããâ¦
ã¨ã£ã¦ãç°¡åã§ãï¼Firefox 3.6 ã§åä½ã確èªï¼ã html fileã®ã¢ãããã¼ããã©ã¼ã ã«onchangeãä»è¾¼ãã§ããã¾ãããã¨ã¯ãèªã¿è¾¼ãã ãã¡ã¤ã«ã®å 容ã表示ããtextareaãç¨æã <html> <head> <meta charset="utf-8"> </head> <body> <input type="file" onchange="read(this)" /> <hr /> <textarea id="text" cols="80" rows="20" wrap="off"></textarea> </body> </html>â¦
ï¼ï¼åç´ã« obj.property ã§ç¢ºèªããã¨ã»ã»ã» var obj = {}; if (obj.hoge) alert('not exist'); obj.hoge = false; if (obj.hoge) alert('exist false'); obj.hoge = null; if (obj.hoge) alert('exist null'); obj.hoge = undefined; if (obj.hoge) alert(â¦
ããããã¨ããããåã«èªåãç¥ããªãã£ãã ãããããã¾ãããã 'hoge'.big() // '<big>hoge</big>' 'hoge'.small() // '<small>hoge</small>' 'hoge'.bold() // '<b>hoge</b>' 'hoge'.italics() // '<i>hoge</i>' 'hoge'.blink() // '<blink>hoge</blink>' 'hoge'.strike() // '<strike>hoge</strike>' 'hoge'.sub() // '<sub>hoge</sub>' 'hoâ¦
ãããµã2010ã®html5ã»ãã·ã§ã³ã§è¦ããã¢ï¼Movement trackerï¼*1 ãã è¡æçã ã£ãã®ã§ video x canvas ãã¡ãã£ã¨åå¼·ããã ï¼ï¼videoã®ä»»æã®ãã¬ã¼ã ããã®ã¾ã¾canvasã«æç»ããã¦ã¿ã htmlã®bodyã«æ¸ãã«ã¯ããã ãã <video id="v" src="video.ogv" autobuffer controls></video> <canvas id="c"></canvas> <input type="button" value="copy frame" onclick="copyFrame()" /> copy frameãã¿ã³â¦
ãã©ã¼ã«ã¹ãããinputè¦ç´ ããã¤ã©ã¤ããããã©ã¼ã«ã¹ãå¤ãããå ã«æ»ãã¨ãã ãããããã©ã¼ã ãä½ããã¨æãã以ä¸ã®ãããªã³ã¼ããæ¸ãããã Firefox3.5 ã Chrome4 ã§ã¯æãããã«åããããIE8ã§ã¯é§ç®ã ã£ãã <p>ââinputââ</p> <input type="text" onfocus="this.style.border='solid 2px #69E'" onblur="this.style.border=''" /> <p>ââinputââ</p> onfocusæã¯ä½â¦
ãã¼ãã«ã®åã¨è¡ãåºå®ãããå ´é¢ããã£ãã®ã§ããã®ã¡ã¢*1ã ã°ã°ã£ã¦ç°¡åã«åºã¦ããã®ããSuper Tables ã¨ããJavaScriptã®ã©ã¤ãã©ãªã ã£ããã ãã¼ãã«ã®å¹ ãé«ããä»»æã®å¤§ããã«ãä»»æã®ã¿ã¤ãã³ã°ã§å¤ãããã¨ããç¨éã«ã¯ã åããªããã«è¦ããã â¦
ãªããæ»ãå¤ãæååãªã®ãã var num = 123.456; alert(typeof num); // number num = num.toFixed(2); alert(typeof num); // string toFixedå¾ã«ãå¤ã表示ããã ããªãå¥ã«è¯ããã©ã ããã«ãã®å¾ãè¨ç®ãç¶ããã«ã¯ãããããæ°å¤åãã¦ãããªãã¨ãâ¦
ãã³ãã³ã®JSãçºãã¦ãããããããããã³ã¼ãããã£ãã®ã§ã¡ã¢ããã ãã¤ãã¼ã¸ã§èªã¿è¾¼ã¾ããmy3.jsã®236è¡ç®*1 var ts = new Date/1000|0; ã¾ããnew Date/1000 ã getTime() ãæ¸ããªãã¦ããåæã«ããªç§ã«ãã¦ãããã¨ã¯ç¥ãã¾ããã§ããã >>> new â¦
<div style="display:none;font-size:14px"> <p><span id="child">åè¦ç´ (æ£ç¢ºã«ã¯åå«è¦ç´ )</span></p> </div> ãããªæãã®htmlããã£ãã¨ãã«ãdisplay:none ãæå®ããã¦ãdivãè¦ãã«ã id="child"ã®è¦ç´ ãããèªèº«ã表示ããã¦ããã®ãã©ãããå¤å¥ãããã æ®éã«styleãè¦ã¦ãå½ç¶ãªãããããã¾ããã >>> alert(document.getElemenâ¦
å ¥åæååãåå¨ããæ¥ä»ãã©ãããå¤å®ãã ãããªæãã§ã©ãã ãã function validDate(str) { var ymd = str.split('/'); // å¹´ææ¥ã®ããªãã¿ã§split. var y = ymd[0]; var m = parseInt(ymd[1],10) - 1; // 0 paddingããã¦ãæååãæ´æ°ã«. "09" => â¦
ã¡ã¢ãã»ã©ã®ãã¨ã§ããªããã©ãa.href ã ã¨åæã«ãã«ãã¹ã«ãã¦ãããã http://example.com/dir/ ã¨ãããã¼ã¸ã ã¨ããã (ãã©ã¦ã¶ã¯Firefox3ã¨IE8ã§ç¢ºèª) <a href="/hoge" onclick="alert(this.href)">hoge</a> >> http://example.com/hoge <a href="hoge" onclick="alert(this.href)">hoge</a> >> http://example.com/dir/hoge hrefã«å ¥ã£ã¦ããå¤ããâ¦
ååï¼ ã¯ã¦ã¶ã®RSSã表示ãã mixiã¢ããªã試ãã«ä½ã£ã¦ã¿ãï¼ã§ããªãã£ãã Ownerè¨å®ã®æ°¸ç¶åãGoogleAppEngine(JSONP)ã使ã£ã¦ãã£ã¦ã¿ã(ã³ã¼ãã¯ä¸çªä¸)ã canvasãã¼ã¸ ã¯ã¦ãªã®IDãå ¥åããããã¹ãBOXãããã è¨å®æ¸ã¿ã®IDãã£ã¼ãããã®ä¸ã«è¡¨ç¤ºâ¦
this.formã§åç §ã§ãããã¨ãç¥ããªãã£ãã®ã§ã¡ã¢ã <form> <input type="button" value="button" onclick="this.form.submit()" /> </form> ããããnameã¨ãidã¨ãæå®ãã¦ãããªãã¦ãã <form name="form1"> <input type="button" value="button" onclick="document.form1.submit()" /> </form> <form id="form1"> </form>
(â») PDFã¯éããã®ãããã®ã§æ³¨æ æ¼¢å CJKçµ±åæ¼¢åï¼http://www.unicode.org/charts/PDF/U4E00.pdf CJKçµ±åæ¼¢åæ¡å¼µAï¼http://www.unicode.org/charts/PDF/U3400.pdf CJKçµ±åæ¼¢åæ¡å¼µBï¼http://www.unicode.org/charts/PDF/U20000.pdf CJKäºææ¼¢åï¼http://â¦
IE8ã¯æ¨æºã¢ã¼ãã¨äºæ表示ã¢ã¼ãã§ã¦ã¼ã¶ã¨ã¼ã¸ã§ã³ããå¤ãã£ã¦ãã¾ãããã§ããã¤ã¾ãã if (navigator.userAgent.indexOf("MSIE 8.") != -1) alert("is IE8"); else alert("isn't IE8"); ããã§ã¯äºæ表示ã¢ã¼ãã®ã¨ãã«å¤å®ãééãã¾ãã ããã§ãIE8â¦
説æããã¾ã§ããªãGoogleã®ãããããã¦ãã§ããã (ãapachiãã§æ¤ç´¢) jinriki_moshikashite.user.jsãã®Greasemonkeyã¹ã¯ãªãããå ¥ãã¦ãGoogleã§æ¤ç´¢ããã¨ã (ãapacheãã§æ¤ç´¢)ãããªæãã§ãã¦ã¼ã¶ããã®æ¤ç´¢ãã¼ã¯ã¼ãã«å¯¾ãã¦ç»é²ãããããããã¦â¦