<input name="text" type="text" value="" id="text"><b>前面输入框停止输入,这里就即时显示输入框里面的内容</b>
js如下:
<html>
<head>
<style>
b { color:blue; margin:8px; }
</style>
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<input type="text" value="some text"/>
<b></b>
<script>
$("input").keyup(function () {
var value = $(this).val();
$("b").text(value);
}).keyup();
</script>
</body>
</html>