GVad.js
上传用户:u_thks
上传日期:2022-07-31
资源大小:1910k
文件大小:1k
源码类别:

WEB源码(ASP,PHP,...)

开发平台:

Java

  1. function adpic(obj, url ,w , h){
  2. document.writeln("<a href=""+ url +"" target="_blank">");
  3. document.writeln("<img src=""+ obj +"" border="0" ");
  4. if(w>0){document.write(" width=""+ w +""");}
  5. if(h>0){document.write(" height=""+ h +""");}
  6. document.write(" alt="广告"/>");
  7. document.writeln("</a>");
  8. }
  9. function adflash(obj,wf,hf){
  10.     document.write("<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" ");
  11. document.write(" width=""+ wf +"" height=""+ hf +"">");
  12. document.write("<param name="movie" value=""+ obj +"" />");
  13.         document.write("<param name="quality" value="high" />");
  14.         document.write("<embed src=""+ obj +"" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" ");
  15. document.write(" type="application/x-shockwave-flash" width=""+ wf +"" height=""+ hf +""></embed>");
  16.      document.write("</object>");
  17. }
  18. function showad(obj, url ,w , h){
  19. var i, ext;
  20. i = obj.lastIndexOf(".");
  21. ext = obj.substring(i+1,obj.length);
  22. ext = ext.toLowerCase();
  23. switch(ext){
  24. case "gif":
  25. adpic(obj,url ,w , h);
  26. break;
  27. case "jpg":
  28. adpic(obj,url ,w , h);
  29. break;
  30. case "png":
  31. adpic(obj,url ,w , h);
  32. break;
  33. case "swf":
  34. adflash(obj,w,h);
  35. break;
  36. default:
  37. adpic(obj,url);
  38. }
  39. }