<input type="text" id="youtext"> <script> youtext.onpaste = function (e) { var buf = window.clipboardData ? window.clipboardData.getData('text') : (e.originalEvent || e).clipboardData.getData('text/plain'); alert(buf); }; </script>