title: how to get onclick value from input data value with javascript
body: <p>how to get onclick value from input data value and execute that function</p>
  
  <p>my html code</p>
  
  <pre><code>&lt;input type="hidden" id="navi" value="shownext(1,2);"&gt;
  &lt;input type="button" id="next" onclick="next();"&gt;
  </code></pre>
  
  <p>my java script </p>
  
  <pre><code>function next(){
      var nq=document.getElementById('navi').value;
      {
      document.getElementById('next').onclick = function() { 'nq' };
  }
  }
  
  function shownext(td,id){
  //code
  }
  </code></pre>
  
  <p>when i click next button its not clicking navi function</p>