Here is an example:
<div id=toexec>
"Hello World<!--".replace("Hello World",'"Goodbye World"');//-->"
</div>
<button onclick=exec()>Exec</button>
<script>
function exec(){
var n = document.getElementById('toexec');
n.innerHTML = eval(n.innerHTML);
}
</script>
The Challenge
Actually there isn't one. I just really like that code
http://qaa.ath.cx/pexec.html
No comments:
Post a Comment