ICode9

精准搜索请尝试: 精确搜索
  • 怎么通过js赋值input的value?2022-09-16 12:34:21

    直接setvalue 不行的; 保存后就消失了;   可以使用此方法:  const input = document.querySelector('#wtbusername') function setInputValue(input, value){ if(!input.disabled){ input.disabled = true } input.value = value } setInputValue(input, 'hello'

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有