演示:1.http://www.v366.net/v/0701/0822521564766746.shtml
2.是跟SOHU女人频道一样的
第1个效果的教程,很简单:
以下内容只有回复后才可以浏览,请先登录!
<!--标签开始--><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td valign=top ><script>
var aPic = new Array();
var aLink = new Array();
var aTitle = new Array();
var aText = new Array();
[loop=4]
aPic[aPic.length] = "{$Field(Picurl,Text,0,...,0,)}";
aLink[aLink.length] = "{$Field(ID,GetInfoUrl,1,1)}";
aTitle[aTitle.length] = "{$Field(Title,Text,0,...,0,)}";
aText[aText.length] = "{$Field(Intro,Text,20,...,0,)}";
[/loop]
var picStr = "",linkStr="",textStrArrStr="",i;
for(i=0;i<aPic.length;i++)
{
if(picStr=="")
{
picStr = aPic[i];
linkStr = aLink[i];
textStrArrStr = "<div style=\"margin-top:10px;\" align=\"center\"><a href=\""+aLink[i]+"\" target=\"_blank\" class=\"news_hd\">"+aTitle[i]+"</a></div><div class=\"flashlr\" style=\"padding:2px;\">"+aText[i]+"……[<a href=\""+aLink[i]+"\" target=\"_blank\" class=\"news_hd_qw\">全文</a>]</div>";
}
else
{
picStr = picStr+"|"+aPic[i];
linkStr = linkStr+"|"+aLink[i];
textStrArrStr = textStrArrStr+"|<div style=\"margin-top:10px\" align=\"center\" ><a href=\""+aLink[i]+"\" target=\"_blank\" class=\"news_hd\">"+aTitle[i]+"</a></div><div class=\"flashlr\" style=\"padding:2px;\"> "+aText[i]+"……[<a href=\""+aLink[i]+"\" target=\"_blank\" class=\"news_hd_qw\">全文</a>]</div>";
}
}
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=\"296\" height=\"235\" id=\"focus1\" name=\"focus1\">");
document.write("<param name=\"allowScriptAccess\" value=\"sameDomain\">");
document.write("<param name=\"movie\" value=\"http://www.v366.net/focus.swf\">");
document.write("<param name=\"quality\" value=\"high\">");
document.write("<param name=\"bgcolor\" value=\"white\">");
document.write("<param name=\"menu\" value=\"false\">");
document.write("<PARAM NAME=\"SCALE\" VALUE=\"exactfit\">");
document.write("<param name=\"wmode\" value=\"opaque\">");
document.write("<param name=\"FlashVars\" value=\"picStr="+picStr+"&"+"linkStr="+linkStr+"\">");
document.write("<embed id=\"focus2\" name=\"focus2\" src=\"http://www.v366.net/focus.swf\" SCALE=\"exactfit\" wmode=\"opaque\" flashvars=\"picStr="+picStr+"&"+"linkStr="+linkStr+"\" menu=\"false\" bgcolor=\"white\" quality=\"high\" width=280 height=190 allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />");
document.write("</object>");
document.write("<div id=\"focusTextArea\"></div>");
var textStrArr=textStrArrStr.split("|");
function setFoucsText(id){
document.getElementById("focusTextArea").innerHTML = textStrArr[id];
}
setFoucsText(0);
var isInternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
function focus1_DoFSCommand(command, args) {
if(command == "setFoucsText"){
setFoucsText(args);
}
}
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 && navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
document.write('<script language="VBScript">\n');
document.write('On Error Resume Next\n');
document.write('Sub focus1_FSCommand(ByVal command, ByVal args)\n');
document.write('Call focus1_DoFSCommand(command, args)\n');
document.write('End Sub\n');
document.write('</script\>\n');
}
</script></td></tr></table><!--标签结束-->
保存标签,然后在需出来的模板里调用标签就OK了!哈..,用科汛是不是很简单啊!