Edit in JSFiddle

/*
 * http://julabs.com
 */
if(document.addEventListener){
    
    // 显示函数
    var showInputChange = (function () {
        var _output = document.getElementById('output');
    
        return function (e) {
            _output.innerHTML = e.target.value;
        }
    
    })();

	document.getElementById('myInput').addEventListener('input',showInputChange);
}else if(document.attachEvent){
    
    // 显示函数
    var showInputChange = (function () {
        var _output = document.getElementById('output');
    
        return function (e) {
        	if (e.propertyName.toLowerCase() == 'value'){
        		 _output.innerHTML = e.srcElement.value;
        	}           
        }
    
    })();
    
	document.getElementById('myInput').attachEvent('onpropertychange',showInputChange);
}
<input type="text" id="myInput">
<p id="output"></p>
#output{height:22px;border:1px solid #f60}