图片轮换

<script language="JavaScript" type="text/javascript">
 var focus_width=250
var focus_height=170
var text_height=24
var swf_height = focus_height+text_height
var pics=<%=pics %>;
var links=<%=links %>;
var texts=<%=texts %>;
//var pics = 'images/01.jpg|images/02.jpg|images/03.jpg|http://bbs.langsin.com/attachments/month_0704/{0C965444-DAE2-4148-B76B-B2B92FC5506E}0_CjpEOZAlYDbs.jpg|images/04.jpg|http://bbs.langsin.com/attachments/A152_HQXPhHHoR3vU.jpg';
//var links = 'viewthread.php?tid=881|viewthread.php?tid=1171|viewthread.php?tid=977|viewthread.php?tid=531|viewthread.php?tid=838|viewthread.php?tid=899';
//var texts = '触发验证问题!求助|分页调查系统如何保存所有数据?|[A027]XML数据岛(罗维原创)|关于tabcontrol控件|[A149]ASP.NET 导航控件(xialei222原创)|[A152]新闻发布系统四(hanxiao原创)';
document.write('<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 +'">');
document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="images/pixviewer.swf"><param name="quality" value="high"><param name="bgcolor" value="#FFFFFF">');
document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
document.write('<embed src="images/pixviewer.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#FFFFFF" quality="high" width="'+ focus_width +'" height="'+ focus_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');document.write('</object>');
</script> 

 

后台的代码:

 public string pics = "";
    public string links = "";
    public string texts = "";
    protected void Page_Load(object sender, EventArgs e)
    {
        SqlConnection con = new SqlConnection("server=.;uid=sa;pwd=526842;database=test");
        con.Open();
        string sqlstr = "select top 4 * from Note order by id desc";
        SqlCommand cmd = new SqlCommand(sqlstr, con);
        SqlDataReader re = cmd.ExecuteReader();
        if (re.Read())
        {
            pics = "'" + "images/" + re["pics"].ToString();
            links = "'" + "show.aspx?id" + re["id"].ToString();
            texts = "'" + re["texts"].ToString();
        }
        while (re.Read())
        {

            pics = pics + "|" + "images/" + re["pics"].ToString();
            links = links + "|" + "show.aspx?id" + re["id"].ToString();
            texts = texts + "|" + re["texts"].ToString();
        }
        pics = pics + "'";
        links = links + "'";
        texts = texts + "'";


    }

 

还需要个FLASH,如果有需要的话联系我

我发给你

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值