JavaScript
俺ã®ã³ã¼ã type Job = Record<'area' | 'act' | 'type' | 'num' | 'days' | 'limit', string>; type Filter = Record<'area' | 'act' | 'type', string[]>; const filter:Filter = { area: [], act: [], type: [] }; (async () => { const resp = await fetâ¦
Reactã§ãã¼ã¸éããå®è£ ããã¨ãã«ãã¨ãããã https://www.npmjs.com/ ã§ãreact paginateãã¨ãã§æ¤ç´¢ãããgoogle:react paginateã§ã°ã°ã£ããããã¨ãreact-paginateã£ã¦ã®ãåºã¦ãããã§ããã www.npmjs.com ããã«ã¤ãã¦è§£èª¬ãã¦ããQiitaã®è¨äºãâ¦
async修飾åã¨awaitæ¼ç®åã®ä½¿ãæ¹ ãã¶ããQiitaãªããã§ã¯2500ãããè¨äºããããããªãã®ãã¿ãããããã£ã¦ãªãã£ãã®ã§èªåç¨ã«ã¾ã¨ãã¦ããã async修飾åã¨awaitæ¼ç®å ãã®2ã¤ãããasync/awaitã¿ããã«ç´¹ä»ããã¦ããã©ä¸¦åã§ä¸¦ã¹ããããªãã®ããâ¦
ä»æ´ã ãã©ã ãã¡ã¤ã«æ§é ã¯ãããªæãã gulpfile.js gulp-functions.js package.json package-lock.json htdocs/ âââ css â âââ images âââ images âââ js src âââ javascripts â âââ vendor âââ scss src/scss => htdocs/css src/javascripts => htdocs/â¦
ãªãããã©ã¤ãã©ãªã§ããããªï¼ã¨æã£ããã©ãæå¤ã¨æ¸ãã¡ãã£ãæ¹ã楽ãªããããªããã¨æã£ã¦æ¸ããã çµè«ããç³ãä¸ãã¾ãã¨ãå¤ç©ãã¡ããã£å½¹ã«ç«ã£ãã ä»»æã®4ç¹ããåè§å½¢ãæãæ¹æ³ ãªããããã©ãèããã°ãããã ããï¼ã£ã¦æã£ããã©ãè¯ãã®â¦
axiosã§ä¸¦åãã¦å ¨é¨çµãã£ããâ¦ã¨ãããã¤ã axios.all([ axios.get('/api/user/'), axios.get('/api/image') ]).then(([res1, res2]) => { this.user = res1.data; this.image = res2.data; }).catch(err =>{ console.log(err); }); ã£ã¦ããã¨ã2ã¤getãâ¦
ä¸ã¤ãã§ãã¯ããã¯ã¹ãããä»ã®ã¯ãã§ãã¯ãããããªãã£ã¦ããã¾ãããã ãããªãã©ã¸ãªããã¯ã¹ä½¿ãã£ã¦è©±ãªã®ã§ãããã©ã¸ãªã¯å ¨é¨è§£é¤ãã§ããªããªã£ã¦ãã¾ãããã£ã¦ããã ï¼å ¨é¨è§£é¤ã®UIã£ã¦ãããã«ããã§ããï¼ ã¨ãããã¨ã§ã <p rel="reserve"> <input type="checkbox" value="1">é¸æè¢1 <input type="checkbox" value="1">é¸æè¢2 </p>â¦
ã¡ã¢ï¼tinymceã¯3系統tinyMCE.init({...})ã®ãªãã·ã§ã³ã§ãadvlist_bullet_stylesãå¤ããå ´åã ã¤ã¾ãã ã¿ããã«ã4ã¤ããããã©ã«ãç¶æ ãã1åã«ãããå ´åã advlist_bullet_styles: [ {title : 'Circle', styles: { listStyleType: "circle ], ã¿ããâ¦
Firefox37ã§çºè¦ãããã±ã¼ã·ã§ã³ãã¼ã®å ¨è§åé¡ ChromeãIEã§ã¯åé¡ãªãã£ãããFirefox34*1ã§ãåé¡ãªãã£ãã®ã ãã©ããã¨ãã°ãã±ã¼ã·ã§ã³ãã¼ã« http://tohokuaiki.hateblo.jp/#ããã«å ¨è§ã¹ã©ãã·ã¥ï¼ãå ¥ãã¾ãã ã¨ããå ´åãFirebugãChromeã®ã³ã³â¦
ã¡ã¢æ¸ã æååããXMLãªãã¸ã§ã¯ããä½æ åèï¼http://www.openspc2.org/reibun/javascript2/XML/convert/0001/ var xml = '<root><twitter><account><name>èªå£²æ°è</name><id>Yomiuri_Online</id></account><account><name>NHKåºå ±å±</name><id>NHK_PR</id></account></twitter></root>'; var xmlParser = nâ¦
ãªãã®ãã£ã¡ãã¨ããæãã§ãããè¦ã¯ã var string = "base=aaa\\|bbb\\=ccc|conf2dita_table_order=1|frame=bottom|platform=pla\\=foo\\|\\|\\|rrr\\=mmm|props=test"; var split = split_ex(string , "|"); // çµæ split = ["base=aaa", "bbb=ccc", "câ¦
ãããããã ãã©ããã¼ãæã«checkboxã«åããã¦ãã°ã«ããã¨ãã1åã ãã³ã¼ã«ãããã ãã©ã $('#foo').on('click', cbfunction); cbfunction(); ã¨ãã£ã¦ããµããããªãã§ãããcbfunctionã¨ã1åãã使ããªããã¨ãããã¨ã§ã $('#foo').on('click', fuâ¦
soyã使ã£ãClosureTemplateãå°å ¥ãããåãJavaScriptç´ç²ãªãã³ãã¬ã¼ãã¨ãã¦AJS.template()ã¡ã½ããããããåèãã¼ã¸ï¼Template | AUI Documentation ãã³ãã¬ã¼ãã®è¨å® ãã³ãã¬ã¼ãã®HTMLã¯<script type="text/x-template">ã使ãã <script type="text/x-template" title="template-title"> <div id="foo"> ããã«é©å½ãªHTMLãã³ãã¬ã¼ããè¨è¿° ãã³ã</div>â¦
facebookã®FB.uiã¡ã½ããã使ãã¨ãã¢ã¼ãã«ãããã¢ããã§Shareã¨ãã®ãªã³ã¯ãåºãã¦ãããã https://developers.facebook.com/docs/reference/javascript/FB.ui/ãããªæãã FB.ui({ method: 'feed', link: "http://d.hatena.ne.jp/tohokuaiki/", redireâ¦
JavaScript - å帰 with promise pattern - Qiitaã®å帰ã var counter = 0; function fact(n) { var d = $.Deferred(); if (n > 1){ console.log("continue",n, ++counter); fact(n -1).done(function(result){ console.log("done", n,result, ++counter); â¦
HTMLã¯ç©ºç½ãæ°ãã¦æåè©°ãããã¨è¦ãç®ãããããªãã®ã§ä½ã£ãã var substrWithoutSpaceChars = function(string, offset, limit) { var ret = "", counter = 0, chara; for (var i=0; i < 10000; i++){ if (i > string.length){ break; } if (counter >=â¦
ãããªæã var dom = document.createElement('div'); var txt = document.createTextNode("¢"); dom.appendChild(txt); console.log(dom.innerHTML); ã ã¨ãã³ã³ã½ã¼ã«ã«¢ ã£ã¦åºã¦ãã¾ããããã¯å°ãã var dom = document.createElement('div'â¦
frameéã§JavaScriptæä½ããã®ã«postMessageããã®ã ãã©ããªãã§ä»å使ã£ããã¨ããã¨ãã¼ã«ã«ã«ç½®ããéçHTMLã§ä½¿ãããã£ãã®ã§ããã®å ´åããªãªã¸ã³ãç¡ãã®ã§Chromeã¨ãSafariã¯ã»ãã¥ãªãã£ã¨ã©ã¼ã§å¼ã£ããã£ã¦ãã¾ãã ä¸æºå 使ãã®ã¯ãjQueryã§pâ¦
jquery deserializeã¨ãã§æ¤ç´¢ããããããã£ãã https://github.com/edgarjs/jquery-deserialize
ãã¹ãã³ã¼ã <html> <head> <script src=" http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.1.min.js"></script> <script> $(function(){ console.log($('.bold').parents()); console.log($('.bold').parent()); }) </script> </head> <body> <div>div, <span>span, </span> <b class="bold">b </b> </div> <p>p, <span>spanâ¦</span></p></body></html>
Flashã®SharedObjectãJavaScriptããCallããæ±ç¨çãªClassãæ¸ãã¦ã¦ããã£ããSharedObjectãªã®ã§ãExternalInterfaceã«ããCallããã¯ã使ããªãã¨ãããªãã ãªã®ã§ãå¤ãç´æ¥JSã«ã¯æããããªãã¦ãProxyãããå¿ è¦ãããã ãããæãããããã©ãã£â¦
ãªãããIE9ã§ãã¾ãåä½ãã¦ãªãã¦ããããã¬èµ·åããããã³ã³ã½ã¼ã«ã«ã¨ã©ã¼ãåºã¦ãã Object doesn't support property or method 'SetReturnValue' ãã®ã¨ã©ã¼ãªããã¼ã£ã¦æã£ã¦èª¿ã¹ãããããã« I've found that, for IE, calling Javascript from Acâ¦
ä½ã®ãã¨ã¯ãªããless.jsã¯watchã¢ã¼ããæå¹ã«ãªãã«ã¯ãhostnameãlocalhost/127.0.0.1/0.0.0.0åºãªããã°ãªããªãã¿ããã http://www.paulsprangers.com/2011/04/quick-tip-less-js-in-development-and-watch-mode/less.jsã®ä¸ã« location.hostname=="12â¦
ãªãããWordPressã®twentytenã¨ãããã¼ãã§ä½ã£ãã®ã ãã©çµå±ä½¿ããªãã£ãã®ã§ã³ããã <div class="menu"><ul><li><a href="..."></li><li>....</li></ul></div> ã¿ãããªé層ãããã¨ãã«ããããã®ãã¤ã«ONã¯ã©ã¹ãä»ããã è¦ï¼http://phpjs.org/functions/parse_url:485åæã¨ãã¦ãã¡ãã¥ã¼ãã¡ããã¨URLãé層ã«ãªã£â¦
input type=textã§Submitãããããªãå ´åããã¾ãããã jQueryåæã§ã <form id="someForm"> <input type="text" name="hoge"> <input type="submit" id="submitbutton"> </form> ã¨ããHTMLãã©ã¼ã ã®å ´åã var post_flag = false; $(function() { $('#submitbutton').bind('mouseup', function(e){ post_flag = true; }); $('#someForm').bind('submiâ¦
æ¤ç´¢ãã¦ãããã¾è¦ã¤ãããªãã£ãã®ã§æ¸ããã ã¾ãããããããã¨ç¡ããã®ãã /****************************************** * jQuery Plugin: escapeENTS * @author ITOH Takashi<itoh_at_junoe.jp> * @date 2011.05.11 * require jQuery v1.4.2 * Version 1.0 * usege: $.</itoh_at_junoe.jp>â¦
JavaScriptã§ãããªã®æ¸ãã¦ãFirebugã®ã³ã³ã½ã¼ã«ããå®è¡ãã¿ã³ãæ¼ãç¶ããã ãã®ç°¡åãªãä»äºã§ãã jQuery('select[name=action]').val('trash'); jQuery('input[type=checkbox]').attr('checked', true); jQuery('#posts-filter').append('<input type="hidden" name="doaction" value="1">').submit();â¦
jQuery1.6ã§ãã¾ãåä½ããªãããã§ãã ã¨ãããã¨ã§ãhttp://w3g.jp/blog/tools/js_browser_sniffing ãåèã«æ¸ãæã var isIE = function() { var version = arguments.length ? arguments[0] : ''; var _ua = (function() { return { ltIE6:typeof winâ¦
ã¡ãã»ã¼ã¸ãã¥ã¼ã£ã¦ããã®ããªï¼ jQueryã®delegate/bindåæã§ã Ajax:Completeã®ã¿ã¤ãã³ã°ã§è©ä¾¡ããã®ãæ¬æ¥ãªãã ãã©ãAjax:Completeã¯è²ããªãã®ã絡ãã§ããã®ã§ããã¾ãç´æ¥ä½¿ããããªãããããããããã¼ã·ã£ã«ãªHTMLã¯è¤æ°ã®å¼ã³åºãå ããCallâ¦
JavaScriptã®ã«ã©ã¼ããã«ã¼ã£ã¦ããã¾ãããã åä½ã§ä½¿ãã¦ãä»ã®ã©ã¤ãã©ãªã¨ãå¹²æ¸ããªãã®ãªãããªã¼ã£ã¦æ¢ãã¦ãããã«ã©ã¼ããã«ã¼.js - JavaScript ã©ã¤ãã©ãªã¼ - HTML5.JPããããããã ãã©ãè²ãé¸æããã¨ãã®ã³ã¼ã«ããã¯é¢æ°ãå®è¡ã§ããªãã®â¦