「Bookmarklet」の版間の差分
ナビゲーションに移動
検索に移動
(ページの作成:「==Bookmarklet== ===ツール=== =====英和辞典===== javascript:window.location.href='http://www2.alc.co.jp/ejr/index.php?word_in=' + encodeURIComponent(prompt('i…」) |
|||
| 14行目: | 14行目: | ||
===Web開発=== | ===Web開発=== | ||
=====inputタグの中身を確認===== | =====inputタグの中身を確認===== | ||
| − | javascript:p();function p(){var e=document.getElementsByTagName('input');var s='';for(var i=0;i | + | javascript:p();function p(){var e=document.getElementsByTagName('input');var s='';for(var i=0;i<e.length;i++){s+=e[i].name+'='+e[i].value+'\n';}alert(s);} |
=====ページのリンクを表示===== | =====ページのリンクを表示===== | ||
| − | javascript:var w=window.open('_blank'); w.document.write(' | + | javascript:var w=window.open('_blank'); w.document.write('<html><head></head><body>'); var links = document.getElementsByTagName('a'); var link; for (var i=0; i<links.length; i++) { link=links[i].getAttribute('href'); w.document.write('<a href=\"' + link + '\">' + link + '</a><br>'); } w.document.write('</body></html>');w.document.close(); |
=====Cookieの表示===== | =====Cookieの表示===== | ||
| − | javascript:c=document.cookie;w=open('_blank');cs=c.split(";");for(i=0;i | + | javascript:c=document.cookie;w=open('_blank');cs=c.split(";");for(i=0;i<5;i++){w.document.write(cs[i]+";<br><br>");}w.document.close(); |
---- | ---- | ||
{{include_html banner_html, "!Javascript"}} | {{include_html banner_html, "!Javascript"}} | ||
2020年2月15日 (土) 08:00時点における版
目次
Bookmarklet
ツール
英和辞典
javascript:window.location.href='http://www2.alc.co.jp/ejr/index.php?word_in=' + encodeURIComponent(prompt('input word',))+ '&word_in2=reedeirrf&word_in3=zJPa7DCxJ15687987t';
閲覧
見やすい書式
- 背景イメージを消す
- 白地
- フォントsmall
javascript:document.body.style.background=;document.body.style.backgroundColor='white';document.body.style.fontSize='small';void(0);
Web開発
inputタグの中身を確認
javascript:p();function p(){var e=document.getElementsByTagName('input');var s=;for(var i=0;i<e.length;i++){s+=e[i].name+'='+e[i].value+'\n';}alert(s);}
ページのリンクを表示
javascript:var w=window.open('_blank'); w.document.write('<html><head></head><body>'); var links = document.getElementsByTagName('a'); var link; for (var i=0; i<links.length; i++) { link=links[i].getAttribute('href'); w.document.write('<a href=\"' + link + '\">' + link + '</a><br>'); } w.document.write('</body></html>');w.document.close();
Cookieの表示
javascript:c=document.cookie;w=open('_blank');cs=c.split(";");for(i=0;i<5;i++){w.document.write(cs[i]+";<br><br>");}w.document.close();
© 2006 矢木浩人