window.onload = function(){ $('.res').append('
それな
'); var link = document.createElement('link'); link.href = 'http://coroani-anime.ldblog.jp/pagecss2.css'; link.rel = 'stylesheet'; link.type = 'text/css'; document.getElementsByClassName('res-outer')[0].appendChild(link); } function sorena(aaa){ if( aaa.innerText == 'それな' ) var nn=0; else var nn=parseInt( aaa.innerText ); var indexno = aaa.parentNode.id; indexno = indexno.replace(/resid/,''); //alert( 'ID…' + indexno ); var path = 15446906; //alert( path ); //cookie //alert(document.cookie); var cook=document.cookie; if(cook.indexOf(path) != -1){ cook=cook.replace(new RegExp('^.*?'+path+'=(.*?)\;.*?$'), '$1'); //alert(cook); if(cook.indexOf('r'+indexno+'x') != -1) { return false; } }else{ cook=''; } $.ajax({ url: "http://tarotools.net/coro/iine2.php", type: "post", data: { 'val1' : path, 'val2' : indexno }, success: function(data){ aaa.innerText = nn+1+'それな'; document.cookie = path+'='+cook+'r'+indexno+'x; max-age=60000'; },error: function(XMLHttpRequest, textStatus, errorThrown){ aaa.innerText = 'エラー!'; } }); }