Jquery keyup事件
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="jquery-1.9.1.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$('#Text1').keyup(function () {
$('div').text($(this).val());
})
})
</script>
</head>
<body>
<input id="Text1" type="text" />
<div></div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="jquery-1.9.1.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$('#Text1').keyup(function () {
$('div').text($(this).val());
})
})
</script>
</head>
<body>
<input id="Text1" type="text" />
<div></div>
</body>
</html>
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.