create a href to call a function "javascript"
<p>I'm trying to create " a href" tag by using javascript but instead of using it as a web-link, i want to use it to do a certain steps! so what can i do?</p>

<pre><code>   var a = document.createElement('a');
        a.attributes('href', 'function () { nn = 0 }' );// ?
        a.textContent = " " + pn.length + " ";
        document.getElementById("pagingN").appendChild(a);
        num[i] = num[i] + n;
</code></pre>
