javascript - 哪里错了,是动态生成一个图片的代码?
高洛峰
高洛峰 2017-04-11 12:23:55
0
4
259
function showCert(){ var oCert = document.createElement("p"); oCert.style.height = 700+'px'; oCert.style.width = 490+'px'; oCert.style.z-index = 2222; var oImg = document.createElement("img"); oImg.src = "${resourceRoot }/web/ybb/assets/img/main/about2.png"; oCert.appendChild(oImg); document.body.appendChild(oCert); }

报错Uncaught ReferenceError: Invalid left-hand side in assignment
index:923 Uncaught ReferenceError: $JssorEasing$ is not defined(anonymous function) @ index:923
7index:265 Uncaught ReferenceError: showCert is not defined

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

모든 응답 (4)
迷茫
oCert.style.z-index = 2222; 应该是这句吧?zIndex
    洪涛
    "${resourceRoot }/web/ybb/assets/img/main/about2.png";

    这句问题

      阿神

      报错的,只有最后一个是报了showCert未定义,那就是其它的地方调用的时候引起的错误

        阿神
        oImg.src = "${resourceRoot }/web/ybb/assets/img/main/about2.png"; 字符串里有个变量??
          최신 다운로드
          더>
          웹 효과
          웹사이트 소스 코드
          웹사이트 자료
          프론트엔드 템플릿
          회사 소개 부인 성명 Sitemap
          PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!