TOKI WOKI. Visual, dev, music, more.
JSãå°ãã§ãã人ãªãããããèããã»ã©ã®ãã¨ãã§ããªãï¼ ä½ãé£ãããã¨ã¯ãªãï¼ã¶ã£ã¨ãã¢ã¾ããªãï¼ãã£ããã¼ï¼ï¼ï¼ ã¨ããããªã§Ajaxãå¦ãã§ã¿ã¾ãããéãã§ãã Ajaxå ¥é Ajaxã¯ããããã§ãããã ãï¼ ä»¥ä¸å ¥éçµãï¼ããã¯å®ç§ã ï¼æ¬¡ããï¼ Ajaxã¯éåæéä¿¡ã ããªãã ããããªããã¯ã©ãã§ããããã ï¼ ã©ãã§ãããï¼ãããªãã¨ãããXMLHttpRequestãªãã¸ã§ã¯ãçæï¼ var request = false; if(window.XMLHttpRequest) { request = new XMLHttpRequest(); //frefox ie7,8 safai opera } else if(window.ActiveXObject) { try { request = new ActiveXObject("Msxml2.XMLHTTP"); // ie6
onBlurï¼onFocusã¤ãã³ããæå®ã§ããè¦ç´ ã¯ãaè¦ç´ ãareaè¦ç´ ãlabelè¦ç´ ãinputè¦ç´ ãselectè¦ç´ ãtextareaè¦ç´ ãbuttonè¦ç´ ã®ã¿ã§ãã onBlurã®ä½¿ç¨ä¾ ããã¹ãããã¯ã¹ãããã©ã¼ã«ã¹ãå¤ããæã«ãæ°å¤ãã§ã㯠<script type="text/javascript"> function isRegNum(obj){ /* å ¥åå¤ */ var str=obj.value; /* æ°å¤ä»¥å¤ã®æååãå«ã¾ãã¦ããå ´å */ if(str.match(/[^0-9]/g)){ /* ã¢ã©ã¼ã表示 */ alert (str.match(/[^0-9]/g)+'\n\nå¹´é½¢ã¯åè§æ°å¤ã§å ¥åãã¦ä¸ãã'); /* ããã¹ãããã¯ã¹ã空ã«ãã */ obj.value=""; return false; } } </sc
ãã¼ã¸å ¨è¬ ããã¯ã¹ ããã¹ã ãªã³ã¯ ãªã¹ã ã¤ã¡ã¼ã¸ ãã¼ãã« ãã¬ã¼ã ãã©ã¼ã ãã£ã«ã¿ CSSã®åºæ¬ CSSããããã£ä¸è¦§ï¼»ABCé ï¼½ ãªãã¡ã¬ã³ã¹ã«ã¤ã㦠HTML ãªãã¡ã¬ã³ã¹ HTML Living Standardã«å¯¾å¿ãããªãã¡ã¬ã³ã¹ã§ãã HTMLã¿ã° ãªãã¡ã¬ã³ã¹ HTML4ã®æ代ã«ä½æãããªãã¡ã¬ã³ã¹ã§ããå¤ãWebãã¼ã¸ãæ´æ°ããéãªã©ã«åèã«ãã¦ãã ããã CSS ãªãã¡ã¬ã³ã¹ CSS2ã®æ代ã«ä½æãããªãã¡ã¬ã³ã¹ã§ãã ç¹éè¨äº ã¬ã³ã¿ã«ãµã¼ãã¼ã®é¸ã³æ¹ ï½ å³é¸ãããããµã¼ãã¼ãæ¯è¼ç´¹ä» ã¬ã³ã¿ã«ãµã¼ãã¼ã®å®¹éã¯ã©ã®ãããå¿ è¦ã ï½ è¨ç®æ¹æ³ã¨ç®å®ã解説
ååã§ã¯HTMLå ã«åå¨ããè¦ç´ ãåç §ããæ¹æ³ãç´¹ä»ãã¦ãã¾ãããä»åã¯ï¼åç §ããè¦ç´ ã®ã¿ã°åãããã¹ãï¼å±æ§ã調ã¹ãæ¹æ³ãç´¹ä»ãã¦ãã¾ãã 次ã®ãµã³ãã«HTMLã使ã£ã¦ï¼ããããã®æ¹æ³ãè¦ã¦ããã¾ãããã <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Language" content="ja"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>W3C Document Object Model</title> </head> <body> <!-- ããã¯ãµã³ãã«ã§ãã --> <h2 original="ç¬èªã®å±æ§">Doc
ãµã¤ããããã°ãJavaScriptã使ã£ã¦åãã®ãããã¼ã¸ã«ãã¹ã¿ã¤ã«ã·ã¼ãã§è¦æ ãè¯ãè£ é£¾ãã¦ã¿ã¾ãããï¼ ã³ãã¼ãã¦ãèªç±ã«ãå©ç¨ãã ããã DOMï¼Document Object Modelï¼ã¨ã¯ JavaScriptã®ãããªããã°ã©ãã³ã°è¨èªããï¼ HTML/XMLææ¸ã«ã¢ã¯ã»ã¹ã㦠ãããæä½ããæ¹æ³ãæä¾ãã¦ãã¾ãã DOMã§ã¯ãHTML/XMLææ¸ã®ãã¹ã¦ã®è¦ç´ ã¯ãã¼ãã¨å¼ã°ãããªãã¸ã§ã¯ãããæ§æããã¦ãã¾ãã ãã®ãã¼ãã¯ããã¤ãããã¾ãã è¦ç´ ãã¼ã (element node)ãããã¹ããã¼ã (text node)ãå±æ§ãã¼ã (attribute node)ã® ï¼ãã®ãã¼ããåºæ¬ã§ãã DOMã¨javaScriptã®é¢é£ã«ã¤ãã¦ã¯The DOM and JavaScript ãåèã«ãã¦ãã ããã ããªãããï¼ãªãåå¿è ã§ãå®å¿ï¼ ãã¼ã ãã¼ã¸ç°¡åä½æãããã ã
DOMã¹ã¯ãªããã£ã³ã°ã§åçãªã¢ã¯ã·ã§ã³ãä¸ããããã«ã¯ï¼ã¾ãHTMLä¸ã«åå¨ããè¦ç´ ãJavaScriptããç¹å®ã§ããªããã°ããã¾ãããããã§ã¯DOMã§è¦å®ããã¦ããå種ææ³ã解説ãã¦ããã¾ãã DOMã使ã£ã¦HTMLã®ç¹å®ã®è¦ç´ ãåç §ããããã«ï¼æ¬¡ã®ä¸ã¤ã®ã¡ã½ããã®ããããã使ãã¾ãã document.getElementById('idå±æ§å¤'); document.getElementsByTagName('è¦ç´ ãã¿ã°ãå'); document.getElementsByName('nameå±æ§å¤'); å®ã¯HTMLå ¨ä½ããç¹å®ã®è¦ç´ ãåç §ããããã«å©ç¨ã§ããã¡ã½ããã¯ï¼ãããä¸ã¤ããããã¾ããããã£ãããã ããè¦ãã¦ããã ãã§ï¼èªç±èªå¨ã«ç¹å®ã®è¦ç´ ã«ãã©ãçããã¨ãã§ãã¾ãã 次ã®HTMLãä¾ã«ï¼ããããã®ã¡ã½ããã®ä½¿ãæ¹ãè¦ã¦ããã¾ãããã <!DOCTYPE html
ããã¯ããããWeb ãã©ã¦ã¶ã®ã¢ãã¬ã¹ãã¼ã«ä»¥ä¸ãå ¥åã Enter ããã¨ã ä»è¡¨ç¤ºããã¦ããå 容ãç´æ¥ç·¨éã§ãããFirefox 3.0.14 㨠IE8 ã§åºæ¥ ããã¨ã確èªããã javascript:document.body.contentEditable='true'; document.designMode='on'; void 0 WEBãã©ã¦ã¶ã¼ã«è¡¨ç¤ºããã¦ããç»é¢ãç´æ¥ç·¨éããæ¹æ³ - sanonosaãã·ã¹ãã 管çã³ã©ã é 追è¨(2009-10-04): æ»ãæ¹æ³ã¯ãªããã®ããªããâfalseâ 㨠âoffâ ã§ã¯åºæ¥ãªãã£ãã 追è¨(2009-10-17): ãæ»ãæ¹æ³ãã¨ããã®ã¯ããç·¨éã¢ã¼ãããé²è¦§ã¢ã¼ãã«æ»ãæ¹æ³ãã®ã ã¨ã§ãã端æã£ãæ¸ãæ¹ã§ãã¿ã¾ããã§ãããããå°ã楽ãªæ¹æ³ãè¦ã¤ã㣠ãã®ã§ã以ä¸ã«è¿½è¨ãã¾ãã IE ã§ã¯ã以ä¸ãå ¥åã Enter
æ¥é ãã楽天ã®ãµã¼ãã¹ããå©ç¨ããã ãã¾ãã¦ãããã¨ããããã¾ãã ãµã¼ãã¹ããå©ç¨ããã ãã¦ããã¾ãã¨ãã大å¤ç³ã訳ãããã¾ããããç¾å¨ãç·æ¥ã¡ã³ããã³ã¹ãè¡ããã¦ããã ãã¦ããã¾ãã ã客æ§ã«ã¯ãç·æ¥ã®ã¡ã³ããã³ã¹ã«ããããè¿·æãããããã¦ãããèª ã«ç³ã訳ãããã¾ããã ã¡ã³ããã³ã¹ãçµäºæ¬¡ç¬¬ããµã¼ãã¹ã復æ§ãããã¾ãã®ã§ã ä»ãã°ãããå¾ ã¡ããã ãã¾ãããããé¡ãç³ãä¸ãã¾ãã
æ¥é ãã楽天ã®ãµã¼ãã¹ããå©ç¨ããã ãã¾ãã¦ãããã¨ããããã¾ãã ãµã¼ãã¹ããå©ç¨ããã ãã¦ããã¾ãã¨ãã大å¤ç³ã訳ãããã¾ããããç¾å¨ãç·æ¥ã¡ã³ããã³ã¹ãè¡ããã¦ããã ãã¦ããã¾ãã ã客æ§ã«ã¯ãç·æ¥ã®ã¡ã³ããã³ã¹ã«ããããè¿·æãããããã¦ãããèª ã«ç³ã訳ãããã¾ããã ã¡ã³ããã³ã¹ãçµäºæ¬¡ç¬¬ããµã¼ãã¹ã復æ§ãããã¾ãã®ã§ã ä»ãã°ãããå¾ ã¡ããã ãã¾ãããããé¡ãç³ãä¸ãã¾ãã
ãã¼ã¿åæããå°ãåºãããã¤ã³ãµã¤ãç¡ãã«AIï¼äººå·¥ç¥è½ï¼ã®æ´»ç¨ã¯å§ã¾ãã¾ãããç§ãã¡ã¯ãåæ¥çç¥èã¨ãã¼ã¿ã»ã¢ããªãã£ã¯ã¹æè¡ãé§ä½¿ããã¼ã¿ããªãã³çµå¶ãå¼·åã«æ¯æ´ãã¾ãã ãã¼ã¿ãã¢ããªãã£ã¯ã¹ãAIã¯ä¼æ¥ã«ã¨ã£ã¦ç«¶åä»ç¤¾ã¨ã®å·®å¥åãå³ããã¤ã¦ãªãã»ã©å¤§ããªè¦å ã«ãªã£ã¦ãã¾ããä»æ¥ã®çµå¶å¹¹é¨ãå¹çãåä¸ããªããæ°ããªåçæºãéæããæ°ãããã¸ãã¹ã¢ãã«ãã¿ã¤ã ãªã¼ã«æ§ç¯ããæ¹æ³ã模索ããä¸ã価å¤ãçã¿åºãæé·ãç¶ããä¼æ¥ã«ã¯ããã¼ã¿æ´»ç¨ãã¨ããå ±éé ãããã¾ããç§ãã¡ã¯ãç¡æ°ã®ãã¼ã¿ããä¼æ¥ã«ã¨ã£ã¦æ¬å½ã«å¿ è¦ãªãã¼ã¿ãæ´»ç¨ããããã®æ¹æ³ãç¥ã£ã¦ãã¾ãã å°æ¥ãè¦æ®ãããªãã¬ã¼ã·ã§ã³ä½å¶ãåãã¦ããä¼æ¥ã®åæ°ä»¥ä¸ï¼52ï¼ ï¼ã¯ããã§ã«ãã¼ã¿ã¨ã¢ããªãã£ã¯ã¹ã大è¦æ¨¡ã«æ´»ç¨ãã¦ãã¾ãããã¼ã¿ã¨AIã«é¢ããåãçµã¿ããã¸ãã¹æ¦ç¥ã«æ²¿ã£ã¦å®æ½ãããã¨ã§æè³å©ççãè¿ éã«æ大åããæçµçã«ã¯AIãã
FirefoxãCPUã常ã«15%ãããé£ãã®ãæ°ã«ãªã£ã¦ããã®ã§èª¿ã¹ã¦ã¿ãããGoogleã®ããããã¼ã¸ãéãã¨ãã®ãããå¢ãã§JavaScriptãå®è¡ããããã¨ãããã£ããå ·ä½çã«ã¯ãvar k=t.value;k!=h&&X(0);h=k ã¨ããã³ã¼ããæ¯ç§100åå®è¡ããã¦ããããã®ããã§ãèªåã®ä½¿ã£ã¦ããPCã ã¨ãGoogleã®ããããã¼ã¸ãéãã ãã§CPU使ç¨çã2%ãããä¸ãã£ã¦ããããã ãFirefoxç¹æã®åé¡ã¨ããããã¯ãã¦ã§ããã¼ã¸å´ã®ä½ãæ¹ã«ä¾ããã®ã¿ããã ããã¶ãä»ã®ãã©ã¦ã¶ã§ãåé¡ã¯å¤ãããªãã ããã Googleã®ããããã¼ã¸ã®å ´åãã³ã¼ãã調ã¹ã¦ã¿ãéãã§ã¯ãåå ã¯ã©ããæ¤ç´¢åè£ã®èªåè£å®ç¨ã®ã³ã¼ãã¿ããã ãç¾å¨ã®å ¥åæååãéå»ã®è¨é²ã¨éã£ããè£å®ã®æ示ãããç´ããã¿ãããªãã¨ããã£ã¦ããããã«è¦ããã HTMLã§ã¯ããã¹ãããã¯ã¹å ã®ããã¹ããå¤æ´ãã
å¤ä¼ã¿ã¯ã¿ã¤å¤å¼ãããµã¼ã¸ã»ããã¼ã«åå ãã¦ãã¾ãããagoã§ãã å é±æ¥ææ¥è¥æITåå¼·ä¼ã«åå ããã¦ããã ããjQueryã®ã³ã¼ããªã¼ãã£ã³ã°ãè¡ã£ã¦ãã¾ããã ããã§jQueryã®ã³ã¼ããèªãã¨ãã®åºç¤ç¥èã«é¢ãã¦ç°¡åã«ã¾ã¨ãã¦ã¿ããã¨æãã¾ãã 1 å¤æ°ã®è¤æ°åæ宣è¨ã¨ä»£å ¥ ã¾ããJSã§ã¯å¤æ°ã®å®£è¨ã¯ä»¥ä¸ã®ãããªå½¢å¼ã§è¡ãã¾ãã var hoge; ãã®å ´åã¯åä¸ã®å¤æ°ã®å®£è¨ã§ããã以ä¸ã®ãããªè¨è¿°ãè¡ãã¨è¤æ°ã®å¤æ°ãåæã«å®£è¨ãããã¨ãå¯è½ã§ãã var hoge, huga; ã¾ããå¤æ°å®£è¨ã¨åæã«å¤ã®ä»£å ¥ãè¡ããã¨ãå¯è½ã§ããã®å ´å以ä¸ã®ãããªè¨è¿°ã«ãªãã¾ãã var hoge = 'test'; ããã«è¤æ°ã®å¤æ°å®£è¨ã¨ãå¤ã®ä»£å ¥ã¯åæã«è¡ããã¨ãå¯è½ã§ããã®å ´å以ä¸ã®ãããªè¨è¿°ã«ãªãã¾ãã var hoge = 'test1', huga = 'test2'; jQuery
HTML ã¨ã¯ HTML ã¨ã¯ã誤解ãæããã«è¨ã£ã¦ãã¾ãã¨ã¦ã§ããã¼ã¸ï¼ãã¼ã ãã¼ã¸ï¼ãä½ãããã«ä½¿ããã¦ããè¨èªã§ãã ä¾ãã°ã以ä¸ã®ãããªãã®ã HTML ã§ãã <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="ja"> <head> <title>ã¿ã¤ãã«</title> </head> <body> <h1>è¦åºã</h1> <p> æ¬ææ¬ææ¬ææ¬ææ¬ææ¬ææ¬ææ¬ææ¬ææ¬ææ¬ææ¬ææ¬ææ¬æ æ¬ææ¬æ<a href="hoge.html">ãã¤ãã¼ãªã³ã¯</a>æ¬æ æ¬ææ¬ææ¬ææ¬ææ¬ææ¬ææ¬ææ¬ææ¬ææ¬ææ¬ææ¬ææ¬ææ¬æ </p> </body> </html> ãµã³ãã« ã¤ã¡ã¼ã¸æ¹§ãã¾ãããï¼ ã§ã¯ãä½æ HTML ã¨ãã
ãã®ãã¥ã¼ããªã¢ã«ã¯ã <canvas> è¦ç´ ã使ç¨ãã¦äºæ¬¡å ã®ã°ã©ãã£ãã¯ãæç»ããæ¹æ³ããåºæ¬ãã説æãã¾ããããã§ã®ä¾ã¯ããã£ã³ãã¹ã§ä½ãã§ããããæ確ã«ç¤ºããã®ã§ãããç¬èªã®ã³ã³ãã³ããä½æããããã®ã³ã¼ãã¹ãããããæä¾ãã¦ãã¾ãã <canvas> 㯠HTML ã®è¦ç´ ã§ãããã¹ã¯ãªããï¼ãµã¤ã㯠JavaScriptï¼ã使ã£ã¦ã°ã©ãã£ãã¯ãæããã¨ãã§ãã¾ããããã¯ä¾ãã°ãã°ã©ããæããããåçãåæããããç°¡åãªã¢ãã¡ã¼ã·ã§ã³ãä½æããããããã¨ãã§ãã¾ãã <canvas> 㯠Apple ã macOS Dashboard ã®ããã« WebKit ã«åãã¦å°å ¥ããå¾ããã©ã¦ã¶ã¼ã«å®è£ ããã¾ãããç¾å¨ã¯ããããã主è¦ãã©ã¦ã¶ã¼ã対å¿ãã¦ãã¾ãã <canvas> ã使ãã®ã¯ããã»ã©é£ããã¯ããã¾ãããã HTML 㨠JavaScript ã®åºæ¬çãªç解ãå¿ è¦ã§ããä¸é¨ã®
HTMLã®è¨è¿° HTMLã®<head>ãã</head>ã®éã«æ¬¡ã®ãããªè¨è¿°ã追è¨ãã¦ãã ããã: <script type="text/javascript" src="http://ããªãã®ãã¡ã¤ã³å/swfobject.js"> </script> <script type="text/javascript" src="http://ããªãã®ãã¡ã¤ã³å/inputdraw.js"> </script> InputDrawã®è¨è¿°ä¾ InputDrawã®ãµã¤ãã¯è±èªã§ããã®ã§ç解ã«è¦ããé¨åãããã¾ãããèªåãªãã«è²ã ã¨è©¦ãã¦ã¿ã¾ããã®ã§å¿ããªãããã«ï¼å¿ãã¦ãããããã«ï¼ã¡ã¢ã Drawerã®è¨è¿° Viewerã®è¨è¿°ï¼SVGãã¼ã¿ãã£ã¼ã«ã ãã表示ããå ´åï¼ Viewerã®è¨è¿°ï¼SVGãã¼ã¿ãã¡ã¤ã« ãã表示ããå ´åï¼ Viewerã®è¨è¿°ï¼ãµã ãã¤ã«è¡¨ç¤ºã®å ´åï¼ Drawerã¨Vie
PHPã¨Flashã®ãã¼ã¿ã®åã渡ãã§è³ªåã§ãã neko.swfããinu.phpã¨ããã¹ã¯ãªãããloadã㦠inu.phpå ã®å¤æ°ãèªã¿è¾¼ã¿ããã®ã§ãããundefinedãè¿ã£ã¦æ¥ã¦ãã¾ãã¾ãã onLoadã使ã£ã¦èª¿ã¹ãæãphpã¸ã®ã¢ã¯ã»ã¹èªä½ã¯æåãã¦ããããã§ãã ã¾ããinu.phpãåä½ã§èªã¿è¾¼ãã¨ãtest=5ããç»é¢ã«åºåãã¾ãã --------------- inu.phpã®ã½ã¼ã¹ <?php echo("test=5"); ?> --------------- neko.swfã®AS stop(); neko = new LoadVars(); neko.onLoad = function (ok) { if(ok){ trace("èªè¾¼ã¿æå"); trace("test=" + neko.test); gotoAndPlay(2); }else{ tra
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}