title: How Can I concatenate a parameter string in javascript function on string in appended html?
body: <p>This is my code for html</p>
  
  <pre><code> &lt;div id="content"&gt;&lt;/div&gt; 
  </code></pre>
  
  <p>Then I append an inpunt to #content:</p>
  
  <pre><code> $( document ).ready(function() {
    // Handler for .ready() called.
         var parameter = "&lt;p&gt;Hola&lt;/p&gt;";
         $("#content").append('&lt;div&gt;&lt;p&gt;click the button&lt;/p&gt;'+
                       '&lt;input type="submit" name="submit_answers" value="Submit" onclick="getValue();" &gt;'+  
                       '&lt;input type="submit" name="submit_answers" value="Submit" onclick="'+getValue2(parameter)+'" &gt;'+                        
                       '&lt;/div&gt;');
  });
  
  function getValue2(parameter){
      alert(parameter);
  }
  
  function getValue(){
      alert("Hola");
  }
  </code></pre>
  
  <p>The first input works very well, but the second input dosen´t work after document is ready. What´s the better way to declare a function in this case?</p>