[JavaScript][VBScript]VBScript + Javascriptで簡単プロジェクト内ツール。その2
0埋めはsliceを使え。
数値の0埋め処理のやり方
3桁0埋め
function zeroPadding3(num){
return ("000" + num).slice(-3);
}
日付型は6/31日とかセットするとちゃんと7/1になってくれる。
//月は0で1月、5で6月
alert(new Date(2010,5,31));
実行結果
Thu Jul 1 00:00:00 UTC+0900 2010
ショートカットを実装するにはshortcuts.jsが便利。
サンプル
shortcut.add("Ctrl+B",function() {
alert("The bookmarks of your browser will show up after this alert...");
}
参考URL:
http://www.openjs.com/scripts/events/keyboard_shortcuts/#add_docs
setTimeoutの繰り返しは自己呼び出しで
function hoge(){
alert("hoge");
setTimeout(hoge,1000);
}
ただしこれをhogeと関数オブジェクトで呼び出さずに
hoge()とするとブラウザが壊れるので要注意。
以上で細々とした備忘終わり。
Read other posts
日記
(11)
大晦日
(9)
読書メーター
(7)
impro
(6)
技術
(5)
Android
(2)
LMDE2
(2)
Linux
(2)
ORSC
(2)
RSGT
(2)
coaching
(2)
docker
(2)
写真
(2)
応用演劇
(2)
読書ノート
(2)
随想
(2)
Ansible
BLE
Bluetooth
Forum Theatre
GPU
INDIA
PostgreSQL
RSGT2016
Scrum Gathering
VISA
WFH
Windows 10
Windows 7
advent calendar
bash
blogger
book
coach
creative-process
docker registry
event
facilitation
feedback
git
goal
hello world
laos
laravel
linux mint
lmde2
microphone
phpunit
presentation
rsgt
rust
scrum
scrum fest osaka
serverside
speaker
sprint review
sqlite
sveltia-cms
trip
ubuntu16
vision
ゴール
デザイン思考
パターン・ランゲージ
ビジョン
ラオス
ラオ語
修理
創造プロセス
勉強会
演劇教育
課題解決