< type="text/javascript">functioninclude(file) {
if(document.createElement&&document.getElementsByTagName) {
varhead=document.getElementsByTagName('head')[0];
varscript=document.createElement('script');
script.setAttribute('type','text/javascript');
script.setAttribute('src', file);
head.appendChild(script);
}else{
alert('Your browser can\'t deal with the DOM standard. That means it\'s old. Go fix it!');
}
}
< /script>
To include included.js with the above code just use:
< type="text/javascript">include('included.js');
< /script>
Không có nhận xét nào:
Đăng nhận xét