ページ中央にGoogleサイト内検索を表示
即興ですが。(position:fixedを理解しないブラウザ不可)
(function(){ var d=document,l=location,f=document.createElement('form'); f.style.cssText='position:fixed;padding:5px;background-color:white;border:#1E90FF solid 1px;top:40%;left:40%;z-index:1000'; f.innerHTML='<input name=q size=30><input type=submit>'; f.onsubmit=function(){location.href='http://www.google.co.jp/search?q=site:'+encodeURIComponent(l.href.substring(0,l.href.indexOf(l.host)+l.host.length)+' '+this.q.value);return false;}; d.body.appendChild(f); f.q.focus(); })()
- -
- -
恥ずかしいので前のは上書きしました!
http://twitter.com/os0x/statuses/764512043
あとページの文字コードは「document.characterSet || document.charset」だよ!
http://twitter.com/os0x/statuses/764513740
ありがとう! id:os0x
即興でも何でもいいから表に出すと新しい知識が増えるかもよ!