日期:2014-05-16 浏览次数:20542 次
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
<title>test</title>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.0.min.js"></script>
</head>
<body>
<input type="text" class="textinput" name="" id="test-btn">
<input type="text" class="textinput" name="" id="test-btn2">
<input type="submit" class="submit" value="test submit">
<script type="text/javascript">
$('.submit').click(function(){
$('.textinput').each(function(){
// alert($(this).attr('id'));
alert(this.id);
});
});
</script>
</body>
</html>