fmpq.com
源代码:
点击运行
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>:focusable Selector 实例</title> <link rel="stylesheet" href="//apps.bdimg.com/libs/jqueryui/1.10.4/css/jquery-ui.min.css"> <style> input, a, p { border: 1px solid #000; } div { padding: 5px; } </style> <script src="//apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script> <script src="//apps.bdimg.com/libs/jqueryui/1.10.4/jquery-ui.min.js"></script> </head> <body> <div><input value="文本输入"></div> <div><a>不带有 href 的锚</a></div> <div><a href="#">带有 href 的锚</a></div> <div><p>不带有 tabindex 的段落</p></div> <div><p tabindex="1">带有 tabindex 的段落</p></div> <script> $( ":focusable" ).css( "border-color", "red" ); </script> </body> </html>
运行结果