<script *!*type="text/javascript"*/!*>
function func() {
*!*var*/!* e=new Function('', 'return '+document.f.t3.value)();
for (*!*var*/!* i in e)document.f.t.value+=i + ': ' + e[i] + ',\n';
}
</script>
<form method="post" name="f">
<input name="t3" type="text" value="window" size="15" maxlength="25" />
<input onclick="func()" name="b" type="button" value="Кнопка" /><br />
<textarea name="t" cols="40" rows="10"></textarea><br />
</form>