1、创建一个名称为 setAttribute 的html文件

3、添加一个button按钮,在点击事件中加入自定义函数mysetAttribute添加一p标签,设置id 为 showsetAttribute

5、在自定义函数中获取input对象,使用setAttribute设置input的类型为button类型


时间:2024-11-29 08:09:21
1、创建一个名称为 setAttribute 的html文件

3、添加一个button按钮,在点击事件中加入自定义函数mysetAttribute添加一p标签,设置id 为 showsetAttribute

5、在自定义函数中获取input对象,使用setAttribute设置input的类型为button类型

