1 /**************************************************************************
2 * jQuery自动完成点击html元素
3 * 声明:
4 * 本来是想让嵌入产品完成自动检测,但是这种方法在Qt4.8的WebView控件中
5 * 不能够正确的执行,目前不知道为什么。
6 *
7 * 2015-8-31 阴 深圳 南山平山村 曾剑锋
8 *************************************************************************/
9
10 <html>
11
12 <head>
13 <script type="text/javascript" src="jquery-latest.js"></script>
14 <script type="text/javascript">
15 $(document).ready(function(){
16 //$("p:contains('title')").prev()[0].click();
17 //$("p:contains('title')").prev().click();
18 $("a:eq(0)")[0].click();
19 });
20 </script>
21 </head>
22
23 <body>
24 <a href = 'http://www.baidu.com' >www.baidu.com</a>;
25 <p>app_title</p>
26
27 </body>
28
29 </html>