焦点新闻总结
焦点新闻以前搞的好像很乱没有正确的,多少有点问题,重新再网上找了个修改
有问题的前台如下:问题就是后台读取的时候有时标题无法显示,具体原因未仔细看,先几下方便以后
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
<!--焦点图开始-->
<script type="text/javascript">
var focus_width=340
var focus_height=240
var text_height=20
var swf_height = focus_height+text_height
var pics="<%=strpics %>"
var links="<%=strlinks %>"
var texts="<%=strtexts %>"
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="http://www.makewing.com/lanren/jscode/js-0010/images/focus1.swf"><param name="quality" value="high"><param name="bgcolor" value="#F0F0F0">');
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('</object>');
</script>
<!--焦点图结束-->
没有问题的前台如下:
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
<!--焦点图开始-->
<script type="text/javascript" >
var focus_width= 340;
var focus_height=260;
var text_height=20;
var swf_height = focus_height+text_height;
var pics="<%=strpics %>"
var links="<%=strlinks %>"
var texts="<%=strtexts %>"
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="/Web/focus1.swf"><param name="quality" value="high"><param name="bgcolor" value="#F0F0F0">');
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('</object>');
</script> <!--焦点图结束-->
后台暂时,具体数据从数据库读取
![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
![](https://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif)
public string strpics = "", strlinks = "", strtexts="";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindPic();
}
}
protected void BindPic()
{
strpics = "/Web/image/1.jpg|/Web/image/2.jpg|/Web/image/3.jpg|/Web/image/4.jpg";
strlinks = "aa|bb|cc|dd";
strtexts = "http://1.com.cn|http://2.com.cn|http://3.com.cn|http://4.com.cn";
}