对应于Form标签的定义:
form_tag(url_for_options = {}, options = {}, *parameters_for_url, &block)
为生成的Form的Html添加Javascript使用类似下面的写法:
<% form_tag({ },{ :onsubmit => 'alert("fdsfsad")' }) do %>
生成的Html如下:
<form action="/login/login" method="post" onsubmit="alert("fdsfsad")">