2007-06-06から1日間の記事一覧
javascript:(function(){n=(t=document.getElementsByTagName('textarea')[0]).selectionStart;v=t.value;s=t.scrollTop;t.value=(v.substr(0,n)+(f=[(d=new Date()).getFullYear(),d.getMonth(),d.getDate()].join("/"))+v.substr(n,v.length));t.scrollTop…
練習用に作った。まだアクティブな(もしくはフォーカスのある)テキストエリアを取得する方法がわからない。 javascript:(function(){dt=new Date();d=document.F1.T1;n=d.selectionStart;v=d.value;t=d.scrollTop;d.value=(v.substr(0,n)+(s=dt.getFullYea…
$ echo -e 'a=function(){print("helloworld")}' > a.js $ js -e 'load("a.js");a()' helloworld
http://developer.mozilla.org/ja/docs/Introduction_to_the_JavaScript_shell 使える組込み関数 print() readline() load() か。ファイル扱いたい!fopen(),read(),write(),fstat()がほしい。まあ、前よりよっぽどましだけど。今の状態でやっとjavascript勉…