Heim > Web-Frontend > js-Tutorial > 用js实现的一个Flash滚动轮换显示图片代码生成器_广告代码

用js实现的一个Flash滚动轮换显示图片代码生成器_广告代码

不言
Freigeben: 2018-05-24 10:04:30
Original
2009 Leute haben es durchsucht

复制代码 代码如下:

<!--文件头模板--> 
<SCRIPT src=top.js></SCRIPT> 
<SCRIPT language=javascript> 
writeTop(&#39;Flash滚动显示图片代码生成&#39;,&#39;2006-10-18&#39;); 
</SCRIPT> 

<!--以下为内容--> 
<SCRIPT> 
//运行代码 
function runEx(cod1) { 
cod=document.getElementById(cod1) 
var code=cod.value; 
if (code!=""){ 
var newwin=window.open(&#39;&#39;,&#39;&#39;,&#39;&#39;); 
newwin.opener = null 
newwin.document.write(code); 
newwin.document.close(); 
} 
} 
//复制代码 
function doCopy(ID) { 
if (document.all){ 
textRange = document.getElementById(ID).createTextRange(); 
textRange.execCommand("Copy"); 
} 
else{ 
alert("此功能只能在IE上有效") 
} 
} 

//展开_收起段落 
function close_open(theID){ 
if(document.getElementById(theID).style.display!=&#39;none&#39;) { 
document.getElementById(theID).style.display=&#39;none&#39;; 
} 
else 
document.getElementById(theID).style.display=&#39;block&#39;; 
} 
</SCRIPT> 

<SCRIPT language=javascript> 
//生成代码 
function genCode() 
{ 
var html=&#39;&#39;; 
var picUrl=&#39;&#39;; 
var picLink=&#39;&#39;; 
var picTitle=&#39;&#39;; 
var picWidth=0; 
var picHeight=0; 
var titleHeight=0; 
var backgroudn=&#39;&#39;; 

{ 
var tempUrl=&#39;&#39;; 
var tempLink=&#39;&#39;; 
var tempTitle=&#39;&#39;; 
for(i=0;i<9;++i){ 
tempUrl=document.getElementById(&#39;picUrl_&#39;+(1+i)).value; 
tempLink=document.getElementById(&#39;picLink_&#39;+(1+i)).value; 
tempTitle=document.getElementById(&#39;picTitle_&#39;+(1+i)).value; 
if(tempUrl == &#39;&#39;)continue; 
if(tempLink == &#39;&#39;)tempLink=tempUrl; 
if(tempTitle == &#39;&#39;)tempTitle=&#39;无题&#39;; 
picUrl += tempUrl + &#39;|&#39;; 
picLink += tempLink + &#39;|&#39;; 
picTitle += tempTitle + &#39;|&#39;; 
} 
picUrl = picUrl.substring(0,picUrl.length-1); 
picTitle = picTitle.substring(0,picTitle.length-1); 
picLink = picLink.substring(0,picLink.length-1); 
picWidth = parseInt(document.getElementById(&#39;picWidth&#39;).value); 
picHeight=parseInt(document.getElementById(&#39;picHeight&#39;).value); 
titleHeight = parseInt(document.getElementById(&#39;titleHeight&#39;).value); 
backgroudn = document.getElementById(&#39;backgroudn&#39;).value; 
} 

html += &#39;<EMBED pluginspage=http://www.macromedia.com/go/getflashplayer src=http://staryxy.googlepages.com/PicPlay.swf&#39;; 
html += &#39; width=&#39; + picWidth; 
html += &#39; height=&#39; + (picHeight + titleHeight); 
html += &#39; type=application/x-shockwave-flash WMODE="opaque" FLASHVARS="&#39;; 
html += &#39;pics=&#39;+picUrl; 
html += &#39;&links=&#39;+picLink; 
html += &#39;&texts=&#39;+picTitle; 
html += &#39;&borderwidth=&#39; + picWidth; 
html += &#39;&borderheight=&#39; + picHeight; 
html += &#39;&textheight=&#39; + titleHeight; 
html += &#39;" MENU="false"&#39;; 
html += &#39; BGCOLOR="&#39; + backgroudn; 
html += &#39;" QUALITY="high" ALLOWSCRIPTACCESS="sameDomain"></EMBED>&#39;; 

document.getElementById(&#39;ShowCode&#39;).value = html; 
show.innerHTML = html; 
} 
</SCRIPT> 

<p style="margin-top:5px;background:#9abcde"> 
<p style=&#39;cursor:hand&#39; onclick=close_open(&#39;edit&#39;)><li>设置</li></p> 
<p id=&#39;edit&#39; style="margin-left:15px; display:block;"> 
<p style="background:#cdcdcd"> 
图片显示宽度:<input size=10 id=picWidth title="图片显示宽度" value="300"></input> 
图片显示高度:<input size=10 id=picHeight title="图片显示高度" value="200"></input> 
文字区域高度:<input size=10 id=titleheight title="文字区域高度" value="20"></input> 
背景色:<input size=10 id=backgroudn title="背景色" value=&#39;#cdcdcd&#39;></input> 
</p> 
<p style="background:#eeeeee"> 
图片一: 
<input maxlength=2048 size=25 id=picUrl_1 value="http://staryxy.googlepages.com/diner1.jpg" title="图片URL地址"></input> 
链接地址:<input maxlength=2048 size=25 id=picLink_1 value="" title="链接地址"></input> 
说明:<input maxlength=2048 size=20 id=picTitle_1 value="「夜宴」搞恶图片1" title="说明"></input> 
</p> 
<p style="background:#cdcdcd"> 
图片二: 
<input maxlength=2048 size=25 id=picUrl_2 value="http://staryxy.googlepages.com/diner2.jpg" title="图片URL地址"></input> 
链接地址:<input maxlength=2048 size=25 id=picLink_2 value="" title="链接地址"></input> 
说明:<input maxlength=2048 size=20 id=picTitle_2 value="「夜宴」搞恶图片2" title="说明"></input> 
</p> 
<p style="background:#eeeeee"> 
图片三: 
<input maxlength=2048 size=25 id=picUrl_3 value="http://staryxy.googlepages.com/diner4.jpg" title="图片URL地址"></input> 
链接地址:<input maxlength=2048 size=25 id=picLink_3 value="" title="链接地址"></input> 
说明:<input maxlength=2048 size=20 id=picTitle_3 value="「夜宴」搞恶图片3" title="说明"></input> 
</p> 
<p style="background:#cdcdcd"> 
图片四: 
<input maxlength=2048 size=25 id=picUrl_4 value="http://staryxy.googlepages.com/diner7.jpg" title="图片URL地址"></input> 
链接地址:<input maxlength=2048 size=25 id=picLink_4 value="" title="链接地址"></input> 
说明:<input maxlength=2048 size=20 id=picTitle_4 value="「夜宴」搞恶图片4" title="说明"></input> 
</p> 
<p style="background:#eeeeee"> 
图片五: 
<input maxlength=2048 size=25 id=picUrl_5 value="http://staryxy.googlepages.com/diner8.jpg" title="图片URL地址"></input> 
链接地址:<input maxlength=2048 size=25 id=picLink_5 value="" title="链接地址"></input> 
说明:<input maxlength=2048 size=20 id=picTitle_5 value="「夜宴」搞恶图片5" title="说明"></input> 
</p> 
<p style="background:#cdcdcd"> 
图片六: 
<input maxlength=2048 size=25 id=picUrl_6 value="http://staryxy.googlepages.com/diner12.jpg" title="图片URL地址"></input> 
链接地址:<input maxlength=2048 size=25 id=picLink_6 value="" title="链接地址"></input> 
说明:<input maxlength=2048 size=20 id=picTitle_6 value="「夜宴」搞恶图片6" title="说明"></input> 
</p> 
<p style=&#39;cursor:hand&#39; onclick=close_open(&#39;editmore&#39;)><li>更多(推荐6张以下,否则说明将看不到)</li></p> 
<p id=&#39;editmore&#39; style=&#39;display:none;&#39;> 
<p style="background:#eeeeee"> 
图片七: 
<input maxlength=2048 size=25 id=picUrl_7 value="" title="图片URL地址"></input> 
链接地址:<input maxlength=2048 size=25 id=picLink_7 value="" title="链接地址"></input> 
说明:<input maxlength=2048 size=20 id=picTitle_7 value="" title="说明"></input> 
</p> 
<p style="background:#cdcdcd"> 
图片八: 
<input maxlength=2048 size=25 id=picUrl_8 value="" title="图片URL地址"></input> 
链接地址:<input maxlength=2048 size=25 id=picLink_8 value="" title="链接地址"></input> 
说明:<input maxlength=2048 size=20 id=picTitle_8 value="" title="说明"></input> 
</p> 
<p style="background:#eeeeee"> 
图片九: 
<input maxlength=2048 size=25 id=picUrl_9 value="" title="图片URL地址"></input> 
链接地址:<input maxlength=2048 size=25 id=picLink_9 value="" title="链接地址"></input> 
说明:<input maxlength=2048 size=20 id=picTitle_9 value="" title="说明"></input> 
</p> 
</p> 
</p> 
<p> 
<input type=button onclick=&#39;javascript:genCode();&#39; value=生成代码> 
</input> 
</p> 
</p> 


<p style="margin-top:5px;background:#9abcde"> 
<p onclick=close_open(&#39;code&#39;) style=&#39;cursor:hand&#39;><li>代码</li></p> 
<p id=&#39;code&#39; style=&#39;margin-left:15px;display:none;&#39;> 
<TEXTAREA rows="15" id="ShowCode" style="width:100%"> 
<!--此处显示结果代码--> 
</TEXTAREA> 
</p> 
<p> 
<INPUT onclick="runEx(&#39;ShowCode&#39;)" type="button" value="运行此代码"/> 
<INPUT onclick="doCopy(&#39;ShowCode&#39;)" type="button" value="复制此代码"/> 
[Ctrl+A 全部选择 提示:你可先修改部分代码,再按运行] 
</p> 
</p> 



<p style="margin-top:5px;background:#9abcde;"> 
<p onclick=close_open(&#39;show&#39;) style=&#39;cursor:hand&#39;><li>显示效果</li></p> 
<p id=&#39;show&#39; title="显示效果" align=center style="margin-left:15px;display:none;background:#abcdef"> 
还没有 
</p> 
</p> 
</p>
Nach dem Login kopieren
Quelle:php.cn
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage