怎么在输入后提取输入的内容?
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>表单中文本框的focus和blur事件</title>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script>
<scripe src ="http://libs.baidu.com/jquery/1.9.0/jquery.js"n type="text/javascripe"> </scripe>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>表单中文本框的focus和blur事件</h1>
<input id="txtest" type="text" value="?" />
<div>
</div>
<script type="text/javascript">
$(function () {
$("input")
.bind("focus", function () {
$("div").html("请输入您的姓名!");
})
$("input").bind("blur", function () {
if ($(this).val().length == 0)
{$("div").html("你的名称不能为空!");}
else{
$("div").html("这里怎么获取我输入的名字")
}
})
});
</script>
</body>
</html>