javascript - Hide Submit button after send form with load method -


I am creating a form and send a request to another page with it:

  $ (Document) variant (); Var email = $ ("# email") Val () ($ ("# send"); $ ("# Exp"). Load ("sendmail.php", {text: text, email: email});});});   

and my form code:

  & lt; Ul & gt; & Lt; Li & gt; & Lt; Input type = "text" name = "name" id = "text" /> gt; & Lt; / Li & gt; & Lt; Li & gt; & Lt; Input type = "text" name = "email" id = "email" /> gt; & Lt; / Li & gt; & Lt; Button class = "button" id = "send" & gt; Send email & lt; / Button & gt; & Lt; Div id = "exp" style = "color: green;" & Gt; & Lt; / Div & gt; & Lt; / Ul & gt;   

How can I submit the button after sending mail?

jQuery:

  $ ( Document) .ready (function () {$ ("# send") Click (function () {var text = $ ("Val") var email = $ ("# email"). Val (); $ Post ("sendmail.php", {text: text, email: email}, function () {$ ('.form'). Hide ();});});});    HTML:   
  & lt; ul class = "form"> 
  • Input type = "lesson "Name" = "id" id = "text">>
  • Input type = "text" name = "email" id = "email" / & Lt; / li & gt; Button class = "button" id = "Send" & gt; Send Email & lt; / button & gt; & lt; div id = "exp" Style = "color: green;" & gt; & lt; / div> & lt; / ul & gt;

  • Comments

    Popular posts from this blog

    java - ImportError: No module named py4j.java_gateway -

    python - Receiving "KeyError" after decoding json result from url -

    .net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -