For example:
<html>
<div id="media">123</div>
<a href="javascript:void(0)" onClick="return fun()">Click</a>
<script type="text/javascript">
function fun() {
document.getElementById("media").innerHTML = '<script type="text/javascript">alert("working");<\/script>';
}
</script>
</html>
After you click the alert does not show.
alert("working")
; is just an example. I want it to finish one job other javascript
. I have a job to be processed through ajax should have used innerHTML