html中的一个button元素,没有id,name之类的,怎么能捕捉到该元素啊?用xpath?代码如下

<input style="margin-bottom: 5px;margin-left: 10px;" type="button" class="common-btn" onclick="ff.pf(event,{ u:'/ProjectTemplate/CreateCommonTemplate', p:'center top', r:0,m:1,w:800, h:330, f:0, t:'', i:'ffPopup', b:[], rs:0, ot:'Save', ct:'Cancel' , sf: RefreshTable, rc:1, pc:'', so:'True',sc:'True'})" value="Create Standard Template">

要java 代码,在线等,谢谢啦

第1个回答  2016-08-15
没有id和name,但是你有class属性啊,通过class属性去获取
使用jquery:
$(".common-btn")本回答被提问者和网友采纳