开发者

A way to make html form disappear?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜