试试这个:
$('input[type=text]').not('input[type=text]#MyOtherInput').bind('keydown', function(e)
{
............
});
它将选择除 myotherinput 控件之外的所有文本类型的输入。试试下面的示例。
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
</head>
<body>
<div id="testdiv">
<input id="Text1" type="text" /><br />
<input id="Text2" type="text" /><br />
<input id="Text3" type="text" /><br />
<input id="Text4" type="text" /><br />
<input id="Text5" type="text" /><br />
<input id="Text6" type="text" /><br />
<input id="MyOtherInput" type="text" />
</div>
</body>
<script type="text/javascript">
$(function()
{
$('input[type=text]').not('input[type=text]#MyOtherInput').bind('keydown', function(e)
{
alert('Common for all ');
});
$('input[type=text]#MyOtherInput').bind('keydown', function(e)
{
alert('Only for MyOtherInput');
});
});
</script>
</html>