开发者

A way to make html form disappear?

开发者 https://www.devze.com 2023-02-07 07:58 出处:网络
What is the recommended or most efficient way (least code/fastest) to make a html form dissapear from a page once the submit button has been pressed and then put in 开发者_如何学Goits place the output

What is the recommended or most efficient way (least code/fastest) to make a html form dissapear from a page once the submit button has been pressed and then put in 开发者_如何学Goits place the output of a .php file?


Use Ajax, with JQuery

http://api.jquery.com/jQuery.ajax/

Create a div for the response (#response_content), and in the callback of the function do something like

$("#form_id").hide();
$("#response_content").html(data);


Use JavaScript and set the form to display:none; (CSS)

And then add a div layer with your output.

0

精彩评论

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