我想在嵌入标签上添加 onclick 事件,但问题是,它在 chrome 上不起作用,并且处理程序不起作用。除了 onclick 事件 mouseover 和 mouseleave 正在工作。这里是代码 HTML
<embed src="http://localhost/credit-app1/" onclick="increaseSize()" onload="bottomRight()">
JAVASCRIPT
function increaseSize(){
var embedtag = document.querySelector("embed");
if(embedtag.style.width == "400px"){
embedtag.style.width = "100px";
embedtag.style.height = "100px";
}else{
embedtag.style.width = "400px";
embedtag.style.height = "500px";
}
console.log(embedtag)
}