win7 环境,主要是一开始想在代码中先用exec.Command启动chrome,但始终不能成功监听9222端口,折腾了很长时间, 需要先手工启动chrome监听端口,具体写在代码注释中了. 然后再运行代码,代码只是在开源代码基础上稍作修改,将访问不了的google换成sohu.代码效果就是通过代码将浏览器导航到了sohu.com // Command standalone is a chromedp example demonstrating how to use chromedp // w
使用前提: 页面内容过多,默认的滚动条太难看,在不引入滚动条插件情况下让界面不使用滚动条,又能通过鼠标滚动 实现步骤: 1 在会出现滚动条的组件上设置隐藏滚动条 overflow:hidden; 2 在上述组件的bind-mouseenter(鼠标进入事件)增加滚动监听器 var num = 0; var i = true; Model.prototype.buttonGroup1Mouseenter = function(event){ var me = this; this.getElem