![](https://img.haomeiwen.com/i5875881/647a081b86f30043.png)
var text = document.getElementById('text');
function show(name){
// 第一种操作属性的方法
// text.value = '1111111111';
// 第二种操作属性的方法([] 方便传参) **除了变量和参数,其它都是要加“”的
text[name] = '111111111';
}
var text = document.getElementById('text');
function show(name){
// 第一种操作属性的方法
// text.value = '1111111111';
// 第二种操作属性的方法([] 方便传参) **除了变量和参数,其它都是要加“”的
text[name] = '111111111';
}
本文标题:属性的两种操作方法
本文链接:https://www.haomeiwen.com/subject/cymuyxtx.html
网友评论