【发布时间】:2015-09-03 03:09:57
【问题描述】:
我需要你的帮助,
我是 jQuery 新手,我不确定如何获取之前在 3 个文本框中输入的文本。
这里是 javascript 以及 HTML 编码:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script type="text/javascript">
window.onload = function() {
$('#one, #two, #three').change(function(e) {
alert(e.target.value)
});
}
</script>
</head>
<body>
<input type="text" id="one">
<input type="text" id="two">
<input type="text" id="three">
</body>
</html>
【问题讨论】:
标签: javascript jquery