アンカータグのhrefにjavascriptを仕込む時の記述
よく忘れるのでメモ。
<a href="javascript:void((function(){my_func('test');})());">ほげほげ</a>
参考URL
voidと()を試してみた - techlog
即時関数(function(){ ... })()の別の書き方いろいろ: Architect Note
よく忘れるのでメモ。
<a href="javascript:void((function(){my_func('test');})());">ほげほげ</a>
参考URL
voidと()を試してみた - techlog
即時関数(function(){ ... })()の別の書き方いろいろ: Architect Note