hello,
what is wrong whis this code?

<div id="Mydiv">anything</div>
<script>
function test(x){alert(x)};
var col=document.getElementById('Mydiv');
col.innerHTML='<div onclick="alert(2);test(123);">Text</div>';
</script>


notes:
1-alert(2); works , but test(123) not working , test(44) is working(outside innerHTML)
2- i want to use parameters inside test() functions i.e: test(123)