试图在Ruby on Rails上为html按钮调用click函数

时间:2017-04-09 22:43:28

标签: html ruby-on-rails ruby

我尝试调用html按钮,其名称为" Giris"如下所示html代码。我没有任何特定的" id"对于按钮,所以我无法使用find_by_id("idCode").click功能。

<div class="form-actions">
<button onclick="__doPostBack('ctl19','')" class="btn btn-success uppercase">Giris</button>

1 个答案:

答案 0 :(得分:0)

You cannot. Since your code loads on browser the only language works there are html css and js. You have to make ajax request and manipulate dom based on response for your purpose or if you don't have to talk to server just write js.