首页 > IT职业 > IT图书 > [使用技巧] 原生js使用合集
window.document.getElementById('ID').checked = true // 选中window.document.getElementById('ID').checked = false // 取消
window.document.getElementById('ID').innerText="span的文本"; // 赋值let val = window.document.getElementById('ID').innerText // 取值
作者:louiema1n
链接:https://www.jianshu.com/p/c7dbcc83b403
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/4362/viewspace-2817387/ ,如需转载,请注明出处,否则将追究法律责任。