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