首页javascriptattributejQuery Selector - 如何通过href链接选择anchor,不包括某些协议

jQuery Selector - 如何通过href链接选择anchor,不包括某些协议

我们想知道如何通过href链接选择anchor,不包括某些协议。

<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
  src='http://code.jquery.com/jquery-1.5.js'></script>
<script type='text/javascript'>
$(window).load(function(){
    console.log($('a:not([href^="callto"])').length);
});
</script>
</head>
<body>
  <a href="http://www.google.com">Google</a>
  <a href="callto://01234123123">Skype Link</a>
</body>
</html>