如何用javascript获取到这个audio 下载控件?

https://img2.mukewang.com/5c4d5d740001e5ef08000478.jpg

为什么用getAttribute("pseudo")获取不到啊?


var div=document.getElementsByTagName("audio")

div[0].getAttribute("pseudo")

找不到audio 禁止下载的audio的api .


动漫人物
浏览 700回答 1
1回答

DIEA

&nbsp; &nbsp; &nbsp; var oInp=document.getElementsByTagName("input");&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; for(var i=0;i<oInp.length;i++){&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(!oInp[i].getAttribute("pseudo"))continue;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if(oInp[i].getAttribute("pseudo").indexOf("download")!=-1){&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; console.log(oInp[i].getAttribute("pseudo"));&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript