如何在
JavaScript中更改HTML对象元素数据属性值?
这是我正在尝试的
<object type="text/html" id="htmlFrame" style="border: none;" standby="loading" width="100%"></object> var element = document.getElementById("htmlFrame"); element.setAttribute("data","http://www.google.com");
解决方法
在jquery中
$('element').attr('some attribute','some attributes value')
即
$('a').attr('href','http://www.stackoverflow.com/')