Created
January 30, 2014 11:54
-
-
Save satomixx/8707000 to your computer and use it in GitHub Desktop.
JavaScriptで、ブラウザデフォルトの確認ダイアログを使う方法 ref: http://qiita.com/mugyuu/items/4331bb6dedc2d76fc8e6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function confirmPugyaa(msg,target){ | |
if(window.confirm(target + "さんに" + msg + "します。\nよろしいですか?\n")){ | |
return true; | |
}else{ | |
return false; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="[% path('/hoge/?i=request&target_id=' _ u.id) %]" method="POST" onSubmit="return confirmPugyaa('m9(^Д^)プギャー', '[% u.nickname %]')"> | |
<input type="hidden" name="target_user_id" value="[% u.user_id %]" /> | |
<div class="info"> | |
<input type="submit" value="申請" class="send" /> | |
</div> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment