0
我收到未捕獲的SyntaxError:意外的令牌鉻非法使用此代碼:未捕獲的SyntaxError:意外的標記非法
var leftMiddleJS = 'function onmouseover() {
document.getElementById("background").style.marginTop = "-135px";
document.getElementById("background").style.marginLeft = "0px";
document.getElementById("background").style.width = "760px";
document.getElementById("background").style.height = "520px";
document.getElementById("background").style.marginTop = "0";
document.getElementById("background").style.marginLeft = "0";
function click() {
document.getElementById("outsideContainer").style.marginTop = "0";
document.getElementById("outsideContainer").style.marginLeft = "0";
document.getElementById("outsideContainer").style.width = "300px";
document.getElementById("outsideContainer").style.height = "250px";
document.getElementById("insideContainer").style.marginTop = "-135px";
document.getElementById("insideContainer").style.marginLeft = "0px"; }';
什麼是代碼中的問題?
它的說法是在第一行 – user2958098
缺少'}''後的document.getElementById(「背景」)。 style.marginLeft =「0」;' –
你在做什麼函數declration''function' onmouseover() –