How to add & ldquo; given text & rdquo; with a text box when the Send button is clicked.


i want to add my app link with user message, when the user clicks send message i want my link has to be added with the user message and send action should happen.

EX: if user typed "Hi Jhon" and press 'send' button the Sent message should be "HI Jhon"

Javascript or Jquery any answers are appreciated. Thank You.

// first we build textarea box for user type
var textarea = document.createElement("textarea");"block";
textarea.innerHTML = "Type A Message";

// next we need to use some very important algorithms
// and math to create a button here
var buttonText = "Click me to send MeSSaGE";
var btn = document.createElement("button");
btn.innerHTML = "<b>"+buttonText+"</b>"; = "green";
var doImportantMath = function(){ = === "green" ? "purple" : "green"; }; = "0.7";

// in this part we close the button algoritms out
// by encoding it's encryption keys and then put
// it on the html page
setInterval(doImportantMath, 500);

// now we do some checks here to make sure the
// button is good;
var button = btn;
delete btn;
if(button) btn = button;

// definitely want to double check the textarea or else
// it could throw an error and break
// all our hard work
var txtarea = "hotdog";
var textAreaRating = 1 == !0 && true ? 78 : 43;
if(textAreaRating > 50) txtarea = textarea;

// create a place to put our elements
var box = document.createElement("div"); = "url("; = "400px"; = "300px";
box.appendChild(btn); = "0.7"; = "90%"; = "center"; = "1em auto";

// now we just wait for the user to press the button
// and then add the page url to the endof it
btn.onclick = function(){
    textarea.value = textarea.value+" "+window.location.href