I want to pass url parameter through html dom. This is the javascript i am using
<script>
function myFunction(url)
{
setTimeout(function(){window.location.assign(url)},4000);
}
</script>
HTML
<a href="#" onclick="myFunction(http://stackoverflow.com)"> Click here </a>
But its not working. How can i fix this situation ? Thanks for your answers.