Check username availability

后端 未结 3 1511
甜味超标
甜味超标 2020-12-24 04:25

I have a form to user login:

<%= form_tag(@action, :method => \"post\", :name => \'signup\' ,:onSubmit => \'return validate();\') do %>    
           


        
3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-24 04:29

    For what reason can you not send an ajax request from javascript code?

    The best way would be to send a GET ajax request when the focus is lost. The get request could then return true or false and your javascript could then reflect this on the page.

提交回复
热议问题