JavaScript passing a string into a method, which is an a attribute
<p>I have the following code:</p>

<pre><code>myFunction('test')
</code></pre>

<p>I wish to set this on the onclick of an html element</p>

<pre><code>&lt;a href="#" onclick="myFunction('test')" &gt;Link&lt;/a&gt;
</code></pre>

<p>I need to capture this as a string and add it via JavaScript as an inner element. How can I capture this?</p>

<pre><code>"&lt;a href="#" onclick="myFunction('test')" &gt;Link&lt;/a&gt;"
'&lt;a href="#" onclick="myFunction('test')" &gt;Link&lt;/a&gt;'
</code></pre>

<p>Neither seem to work.</p>
