//通过url判断当前页,动态给导航加样式 var str =location.pathname; var index = str.lastIndexOf("\/"); str = str.substring(index + , str.length); //如果要干掉一些指定的字符串这样写 var str =location.pathname; var index = str.lastIndexOf("\/"); str = str.substring(index
通过webdriver中的.title和.current_url获取title和url from time import sleep from selenium import webdriver browser=webdriver.Firefox() browser.get("http://www.zuzuche.com") browser.find_element_by_link_text(u"门票玩乐").click() sleep(3) #获取当前的title
100. Same Tree Given two binary trees, write a function to check if they are the same or not. Two binary trees are considered the same if they are structurally identical and the nodes have the same value. Example 1: Input: 1 1 / \ / \ 2 3 2 3 [1,2,3]