Last active
December 19, 2015 05:49
-
-
Save mbuyco/5906531 to your computer and use it in GitHub Desktop.
This is how you append html codes using JQuery.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() | |
{ | |
$("#append_form").submit(function() { | |
// The \n below is for new line in JavaScript | |
var append_texts = "<div>\n"+ | |
$("#append_text_1").val() +" "+ $("#append_text_1").val() +"\n"+ | |
"</div>"; | |
$("#append_area").append(append_texts); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment