<form name="vesselForm" novalidate>
<input type="text" id="owner" name="ownerEdit" required ng-blur="vesselForm.btnCC.attr('value', 'Change Customer')"/>
<input type="button" name="btnCC" value="Customer" />
</form>
我想将按钮的值从“客户”更改为“更改客户”。试过没有。方式:
vesselForm.btnCC.value='Change Customer'
this.vesselForm.btnCC.value='Change Customer'
vesselForm.btnCC.value('Change Customer')
document.btnCC.value='Change Customer'
vesselForm.btnCC.attr('value', 'Change Customer')
但没有成功。感谢任何帮助。提前谢谢。
答案 0 :(得分:0)
如果您想要通过某个事件触发的javascript执行此操作,那么您需要添加
document.getelementById('btnCC').value = "Change Customer";
HTML
<input blah blah onblur="document.getelementById('btnCC').value='Change Customer'" />