我正在尝试打印value=字段后面的文本,到目前为止,输出如下所示。在
<div class="controls"><input class="span12 text-bound" id="client_appbundle_prospecttype_name" maxlength="100" name="client_appbundle_prospecttype[name]" required="required" type="text" value="John Smith"/></div>
我的代码是这样的。在
^{pr2}$如何打印“value=”后面的文本,以便只打印John Smith
谢谢!在
在使用CSS选择器时使用id会更快,而且在可用时应该是您的首选(并且在页面上是唯一的)。然后可以使用
.get
访问匹配元素的value
属性的值。在相关问题 更多 >
编程相关推荐