set_attribute 设置属性

set_attribute(id_name string,attr string,value string);

输入参数

  • id_name id 名称
  • attr 属性名 具体可查看html标准
  • value 值 具体可查看html标准

输出参数

例子

// 对元素属性设置
set_attribute("id_name","style","position: absolute;");
set_attribute("id_name","data-value","123");
作者:力博特  创建时间:2025-12-08 17:28
最后编辑:力博特  更新时间:2026-01-13 17:31