开发者社区> 问答> 正文

js清除input value,页面值不改变

<span></span><from>

<table>
<tr>
     <td align="right" style="width: 138px;">资源英文名称:</td>
     <td><input class="easyui-textbox" type="text" name="NAME" id="NAME" ></in          put></td>
</tr>
</table></from>
js代码

alert  name为空,但页面的值没有改变。为啥咧??

function clearForm(){
document.getElementById("NAME").value="";<span style="font-size:9pt;line-height:1.5;"> }</span>

展开
收起
a123456678 2016-07-14 16:14:44 3320 0
1 条回答
写回答
取消 提交回答
  • setText text Set the displaying text value.
    getText none Get the displaying text value.
    setValue value Set the component value.
    getValue none Get the component value.

    2019-07-17 19:56:29
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
JavaScript函数 立即下载
Delivering Javascript to World 立即下载
编程语言如何演化-以JS的private为例 立即下载