try{ document.write(document.getElementById('txt1').value); }catch(e){}