注意是用到了, 下列的演示
<scriptLanguage = "javascript" type = "text/javascript">
AdTime = 8;
chancead = 1;
varns = (document.layers);
varie = (document.all);
varw3 = (document.getElementById &&! ie);
adcount = 0;
functionInitad () {
if (! ns &&! ie &&! w3) return;
if (เช่น) addiv = eval ('document.all.sponsoraddiv.style');
elseif (ns) addiv = eval ('document.layers ["sponsoraddiv"]');
elseif (w3) addiv = eval ('document.getElementById ("sponsoraddiv"). Style');
randad = math.ceil (math.random ()*chancead);
ถ้า (เช่น || w3)
addiv.visibility = "มองเห็นได้";
อื่น
Addiv.visibility = "แสดง";
ถ้า (randad == 1) showad ();
-
functionshowad () {
if (adcount <adtime*10) {adcount+= 1;
if (เช่น) {documentWidth = document.body.offsetWidth/2+document.body.scrollleft-20;
documentHeight = document.body.offsetheight/2+document.body.scrolltop-20;}
elseif (ns) {documentWidth = window.innerWidth/2+window.pagexoffset-20;
documentHeight = window.innerHeight/2+window.pageyoffset-20;}
elseif (w3) {documentWidth = self.innerWidth/2+window.pagexoffset-20;
documentHeight = self.innerHeight/2+window.pageyoffset-20;}
addiv.left = documentWidth -100; addiv.top = documentHeight-0;
settimeout ("showad ()", 100);}
-
functionclosead () {
ถ้า (เช่น || w3)
addiv.display = "ไม่มี";
อื่น
Addiv.visibility = "ซ่อน";
-
ฟังก์ชั่น $ (obj) {
returnDocument.getElementById (OBJ);
-
functionCheckForm () {
if ($ ("file1"). ค่า! = "")
-
if (/jpg THENIGETEGEGEGEGEFIF TEST ("" ("file1"). value.match (//.(//w+) $/) [0]) == FALSE) {
การแจ้งเตือน ("您只能上传图片文件");