如果有人能帮我我很感激。我有一个表格
*Mailing Address*
*Physical Address*一个有身份证,一个没有。例如:当我只使用邮件地址街道字段并运行脚本时,它还会插入物理地址街道字段。我不知道如何到达父DIV来分离邮件和物理地址街字段。因此,它只能输入一个街道地址,任何帮助欣赏。
$("input", id: "Street").value("780 woodland ave")邮寄地址:
></fieldset><fieldset id="fieldset-mailing-list"><legend>Mailing List <a id="mailing-list" name="mailing-list"/></legend><div class="row-fluid"><div class="span12"><div class="control-group"><label for="mailName" class="control-label">In Care of Name</label><div class="controls"><input placeholder="" class="mailName span12" ng-model="Application.contactInformation.mailingAddress" id="mailName" type="text"/></div></div></div ></div><div class="row-fluid"><div class="span6"><div class="control-group"><label for="street" class="control-label">Street</label><div class="controls"><input ng-required="isRequired()" placeholder="Street Number and Name" class="required" ng-model="Application.contactInformation.mailingAddress.street" name="street" id="street" type="text"/><br/><span ng-show="application.street.$error.required" style="color:red">***a required field***<br/></span></div></div></div>物理地址:
></fieldset><fieldset id="fieldset-physical-mailing-list"><legend>Physical Address <a id="physical-mailing-list" name="physical-mailing-list"/></legend><div class="row-fluid"><div class="span12"><label class="checkbox"><input name="sameAddress" id="sameAddress" type="checkbox"/>
物理地址与邮件地址.相同
</label></div></div><div class="row-fluid"><div class="span6"><div class="control-group"><label for="street" class="control-label">Street</label><div class="controls"><input placeholder="Street Number and Name" class="" ng-model="Application.contactInformation.physicalAddress.street" id="street" type="text"/></div></div></div>发布于 2013-01-22 13:02:09
若要选择街道输入,请执行以下操作:
$('input', name: 'street')要选择错误消息,可以这样说:
$('input', name: 'street').closest('div').find('span')或者:
$('input', name: 'street').parent().find('span')或者:
$('input', name: 'street').nextAll('span')https://stackoverflow.com/questions/14390942
复制相似问题