リファレンス

http://api.rubyonrails.com/classes/ActionView/Helpers/JavaScriptHelper.html

http://api.rubyonrails.com/classes/ActionView/Helpers/PrototypeHelper.html