开发者

RoR rjs assign prompt value to variable

how i can assign rjs prompt value to a variable

page开发者_如何学编程 << "prompt('Enter the new first name:');"

when i call in alert


Try just adding your assignment to your javascript statement:

page << "var response = prompt('Enter the new first name:');"

You should then be able to access the value of response in your client side javascripts.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜