jquery 调用js成员
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
<script src="jquery-1.7.1.min.js"></script>
<script>
$(function(){
$('#btnCacul').click(function () {
var num =parseInt( $('#txt').val());
num++;
$('#txt').val(num);
});
});
</script>
</head>
<body>
<input type="text" name="name" value=" " id="txt" />
<input type="button" name="name" value="Cacul" id="btnCacul" />
</body>
</html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
<script src="jquery-1.7.1.min.js"></script>
<script>
$(function(){
$('#btnCacul').click(function () {
var num =parseInt( $('#txt').val());
num++;
$('#txt').val(num);
});
});
</script>
</head>
<body>
<input type="text" name="name" value=" " id="txt" />
<input type="button" name="name" value="Cacul" id="btnCacul" />
</body>
</html>