开发者

RoR rjs assign prompt value to variable

开发者 https://www.devze.com 2023-01-10 08:07 出处:网络
how i can assign rjs prompt value to a variable page开发者_如何学编程 << \"prompt(\'Enter the new first name:\');\"

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

精彩评论

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