草庐IT

fbScript

全部标签

javascript - "Unable to get value of the property ' appendChild ': object is null or undefined"同时将脚本附加到 IE

当我尝试将以下脚本附加到IE时,出现此错误:“错误:无法获取属性‘appendChild’的值:对象为空或未定义”它在Chrome中运行良好,但在IE9上测试时会出现这种情况。谁能告诉我错误是什么?//createscriptindocumentvarfbScript=document.createElement("script");fbScript.type="text/javascript";//makescriptsourcethefacebookpluginfbScript.src="http://connect.facebook.net/en_US/all.js#xfbml=