小编Eti*_*nne的帖子

xpath获取标签内的复选框

我有这个代码

<label>
  <input type="radio" checked="checked" value="fOejPdlZIx83HA" name="btnRad">
  Test1
</label>
<label>
  <input type="radio" checked="checked" value="fdsaf4waff4sssd" name="btnRad">
  Test2
</label>
<label>
  <input type="radio" checked="checked" value="fg43fasd43wsat4" name="btnRad">
  Test3
</label>
Run Code Online (Sandbox Code Playgroud)

我希望通过xpath根据标签文本访问单选按钮

我已经尝试过多种方法:

//input[@name='btnRad]']/following::*[contains(text(),'Test3')]
//label[text()='Test3']/input[@name='btnRad']
//*[contains(text(),'Test3')]
Run Code Online (Sandbox Code Playgroud)

即使是最后一个也没有给我任何回报,所以xpath认为"Test3"不是标签的文字......任何人都知道如何做到这一点?

xpath text label

4
推荐指数
1
解决办法
6606
查看次数

用php写一个borland数据库引擎

我需要从php编写一个borland数据库引擎(dbase).我知道这不是推荐的,可能是个坏主意,但我必须将我的数据链接到只能读取dbase文件的软件.

所以任何人都知道如何从头开始创建一个来自php的borland db?

php dbase

-5
推荐指数
1
解决办法
634
查看次数

标签 统计

dbase ×1

label ×1

php ×1

text ×1

xpath ×1