Code chèn hình ảnh, quảng cáo hai bên blog mới
Xin giới thiệu với mọi người đoạn code chèn hình ảnh, quản cáo hai bên mới :
<script language="JavaScript">
var tagDiv_p1="";
if (!document.layers)
tagDiv_p1 ='<div style="position:absolute" id="divStayTopLeft_p1">';
tagDiv_p1 +='<layer id="divStayTopLeft_p1"><table border="0" cellspacing="0"
cellpadding="0"><tr><td><img src=link ảnh></td></tr></table></layer></div>';
var verticalpos_p1="frombottom";
if (!document.layers)
if(document.body.clientWidth >800)
document.write(tagDiv_p1);
function JSFX_FloatTopDiv_p1()
{
//startX_p1_p1 ngang startY_p1_p1 doc
var startX_p1 =(document.body.clientWidth-800)/2 + 795,startY_p1 = 555;
var ns_p1 = (navigator.appName.indexOf("Netscape") != -1);
var d_p1 = document;
function ml_p1(id)
{
var el_p1=d_p1.getElementById?d_p1.getElementById(id):d_p1.all?
d_p1.all[id]:d_p1.layers[id];
if(d_p1.layers)el_p1.style=el_p1;
el_p1.sP=function(x,y){this.style.left=x;this.style.top=y;};
el_p1.x = startX_p1;
if (verticalpos_p1=="fromtop")
el_p1.y = startY_p1;
else{
el_p1.y = ns_p1 ? pageYOffset + innerHeight : document.body.scrollTop +
document.body.clientHeight;
el_p1.y -= startY_p1;
}
return el_p1;
}
window.stayTopLeft_p1=function() {
if (verticalpos_p1=="fromtop"){
var pY_p1 = ns_p1 ? pageYOffset : document.body.scrollTop;
ftlObj_p1.y += (pY_p1 + startY_p1 - ftlObj_p1.y)/8;
}
else{
var pY_p1 = ns_p1 ? pageYOffset + innerHeight : document.body.scrollTop +
document.body.clientHeight;
ftlObj_p1.y += (pY_p1 - startY_p1 - ftlObj_p1.y)/8;
}
ftlObj_p1.sP(ftlObj_p1.x, ftlObj_p1.y);
setTimeout("stayTopLeft_p1()", 10);
}
ftlObj_p1 = ml_p1("divStayTopLeft_p1");
stayTopLeft_p1();
}
JSFX_FloatTopDiv_p1();
</script><script language="JavaScript">
var tagDiv_tr1="";
if (!document.layers)
tagDiv_tr1 ='<div style="position:absolute" id="divStayTopLeft_tr1">';
tagDiv_tr1 +='<layer id="divStayTopLeft_tr1"><table border="0" cellspacing="0"
cellpadding="0"><tr><td><img src=link ảnh></td></tr></table></layer></div>';
var verticalpos_tr1="frombottom";
if (!document.layers)
if(document.body.clientWidth >800)
document.write(tagDiv_tr1);
function JSFX_FloatTopDiv_tr1()
{
//startX_tr1_tr1 ngang startY_tr1_tr1 doc
var startX_tr1 =(document.body.clientWidth-800)/2-106,startY_tr1 = 555;
var ns_tr1 = (navigator.appName.indexOf("Netscape") != -1);
var d_tr1 = document;
function ml_tr1(id)
{
var el_tr1=d_tr1.getElementById?d_tr1.getElementById(id):d_tr1.all?
d_tr1.all[id]:d_tr1.layers[id];
if(d_tr1.layers)el_tr1.style=el_tr1;
el_tr1.sP=function(x,y){this.style.left=x;this.style.top=y;};
el_tr1.x = startX_tr1;
if (verticalpos_tr1=="fromtop")
el_tr1.y = startY_tr1;
else{
el_tr1.y = ns_tr1 ? pageYOffset + innerHeight : document.body.scrollTop +
document.body.clientHeight;
el_tr1.y -= startY_tr1;
}
return el_tr1;
}
window.stayTopLeft_tr1=function() {
if (verticalpos_tr1=="fromtop"){
var pY_tr1 = ns_tr1 ? pageYOffset : document.body.scrollTop;
ftlObj_tr1.y += (pY_tr1 + startY_tr1 - ftlObj_tr1.y)/8;
}
else{
var pY_tr1 = ns_tr1 ? pageYOffset + innerHeight : document.body.scrollTop +
document.body.clientHeight;
ftlObj_tr1.y += (pY_tr1 - startY_tr1 - ftlObj_tr1.y)/8;
}
ftlObj_tr1.sP(ftlObj_tr1.x, ftlObj_tr1.y);
setTimeout("stayTopLeft_tr1()", 10);
}
ftlObj_tr1 = ml_tr1("divStayTopLeft_tr1");
stayTopLeft_tr1();
}
JSFX_FloatTopDiv_tr1();
</script> </div>
Thay link ảnh bằng link của hình ảnh muốn hiển thị.