代码如下,
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
<script language="javascript" type="text/javascript" >
function default_GetXml(spic,slinks,stexts,sfocus_width,sfocus_height,stext_height,divid)
{
var shtml = "";
var focus_width = sfocus_width;
var focus_height = sfocus_height;
var text_height = stext_height;
var pics = spic;
var links = slinks;
var texts = stexts;
var swf_height = parseInt(focus_height)+parseInt(text_height);
shtml += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">';
shtml += '<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="flash/picflash.swf"><param name="quality" value="high"><param name="bgcolor" value="#EbEbEb">';
shtml += '<param name="menu" value="false"><param name="wmode" value="opaque">';
shtml += '<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">';
shtml += '<embed src="flash/picflash.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#EbEbEb" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"/>';
shtml += '</object>';
document.getElementById(divid).innerHTML = shtml;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="image">
<%
//定义要传递的参数,可通过数据库直接获取,按下列格式拼接完整,连接符为"|"
string imgUrl = "images/1.jpg|images/2.jpg|images/3.jpg|images/4.jpg|images/5.jpg";
string imgLink = "http://baidu.com|http://baidu.com|http://baidu.com|http://baidu.com|http://baidu.com";
string imgTitle = "标题一|标题二|标题三|标题四|标题五";
//传递参数给JS代码,需要7个参数。图片路径、链接地址、图片标题、div的宽、高、标题文字的行高、div的ID
Response.Write("<script type='text/javascript'>default_GetXml('" + imgUrl + "','" + imgLink + "','" + imgTitle + "','397','250','18','image')</script>");
%>
</div>
</form>
</body>
</html>
点标题二会有提示,但是在IE6和IE8内核的360浏览器正常
QQ:562572593
ie8的安全机制不一样的原因吧.
1)可以设置ie8的不阻止弹出窗口的,好像ie8里在工具-阻止窗口弹出程序-关闭弹出窗口阻止程序 就可以了.
2)我本地用的ie9,貌似也可以在工具-选项,在安全里,一个是设置-安全-其他-使用窗口弹出阻止程序-关闭应该也可以.
3)或者永别的方法实现你这个效果,
欢迎入群讨论,QQ群:149385300.