上午,當試圖做類似獲得奇怪的錯誤運行以下功能
HTML('slider1') = someimage;
但我HTML()
功能沒有返回document.getElementById('slider1');
This is the error am getting on chrome
function HTML(id){
if(typeof value !== undefined){
return document.getElementById(id).innerHTML;
}
}
你正試圖給函數賦值?不應該這是'var someimage = HTML('slider1');'而不是? – Cyclonecode