首页javascriptclassjQuery Selector - 如何选择没有myTable字符串的类

jQuery Selector - 如何选择没有myTable字符串的类

我们想知道如何选择没有myTable字符串的类。

<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-compat-git.js'></script>
<script type='text/javascript'>
$(function(){
    $("span[class^='myTable']").not('#notThis').hide();
});
</script>
</head>
<body>
  <span id="notThis" class="myTable"> myTable 1</span>
  <span class="myTable2"> myTable 2</span>
  <span class="myTable3"> myTable 3</span>
</body>
</html>