Home >Web Front-end >CSS Tutorial >Another way to use the ActiveX control before flash slides can be used_Experience exchange

Another way to use the ActiveX control before flash slides can be used_Experience exchange

WBOY
WBOYOriginal
2016-05-16 12:06:531681browse

Due to various reasons, Microsoft has restricted the use mode of IE's ActiveX after sp2. That is, there is a virtual box in the ActiveX on the page, which requires the user to click once for normal interaction. Flash is embedded into the web page as an ActiveX, so it will also be implicated. Only embedding Flash through JS can solve this problem. There is no Flash version detection. If the flash plug-in version of the browser is not enough, or your swf file cannot be displayed normally, or an ActiveX installation confirmation box will pop up - this box is very scary for many users. Find it online. After working for a long time, there was no one about the slide advertising code. I had no choice but to research it myself and passed the test.

First, in the

area, insert the reference:


global.js code is as follows:
Copy code The code is as follows :

function my_getbyid(id) 

   itm = null; 
   if (document.getElementById) 
   { 
      itm = document.getElementById(id); 
   } 
   else if (document.all) 
   { 
      itm = document.all[id]; 
   } 
   else if (document.layers) 
   { 
      itm = document.layers[id]; 
   } 

   return itm; 


function sunad(element,url,width,height,images,links,texts) 

if (!my_getbyid(element)) return; 
var str = ''; 
str  = ''; 
str  = ' '; 
str  = ' '; 
str  = ''; 
str  = ''; 
str  = '
'; 
my_getbyid(element).innerHTML = str; 

在需要放置幻灯片的地方,用下面的代码覆盖,也可以把下面的代码单独写成一个文件调用,
如文件名为ad.asp,在幻灯片区域调用:
复制代码 代码如下:

In the above code: var focus = 'http: //www.abc.com/ad/focus.swf';
The focus.swf in this sentence is a flash playback file
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn