0

0

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

不言

不言

发布时间:2018-05-24 10:04:30

|

2170人浏览过

|

来源于php中文网

原创

SpeechEasy
SpeechEasy

SpeechEasy是一种合成语音解决方案,可以让用户从文本生成高质量、易于理解的音频。

下载

复制代码 代码如下:

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

<!--以下为内容--> 
<SCRIPT> 
//运行代码 
function runEx(cod1) { 
cod=document.getElementById(cod1) 
var code=cod.value; 
if (code!=""){ 
var newwin=window.open('','',''); 
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!='none') { 
document.getElementById(theID).style.display='none'; 
} 
else 
document.getElementById(theID).style.display='block'; 
} 
</SCRIPT> 

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

{ 
var tempUrl=''; 
var tempLink=''; 
var tempTitle=''; 
for(i=0;i<9;++i){ 
tempUrl=document.getElementById('picUrl_'+(1+i)).value; 
tempLink=document.getElementById('picLink_'+(1+i)).value; 
tempTitle=document.getElementById('picTitle_'+(1+i)).value; 
if(tempUrl == '')continue; 
if(tempLink == '')tempLink=tempUrl; 
if(tempTitle == '')tempTitle='无题'; 
picUrl += tempUrl + '|'; 
picLink += tempLink + '|'; 
picTitle += tempTitle + '|'; 
} 
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('picWidth').value); 
picHeight=parseInt(document.getElementById('picHeight').value); 
titleHeight = parseInt(document.getElementById('titleHeight').value); 
backgroudn = document.getElementById('backgroudn').value; 
} 

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

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

<p style="margin-top:5px;background:#9abcde"> 
<p style='cursor:hand' onclick=close_open('edit')><li>设置</li></p> 
<p id='edit' 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='#cdcdcd'></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='cursor:hand' onclick=close_open('editmore')><li>更多(推荐6张以下,否则说明将看不到)</li></p> 
<p id='editmore' style='display:none;'> 
<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='javascript:genCode();' value=生成代码> 
</input> 
</p> 
</p> 


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



<p style="margin-top:5px;background:#9abcde;"> 
<p onclick=close_open('show') style='cursor:hand'><li>显示效果</li></p> 
<p id='show' title="显示效果" align=center style="margin-left:15px;display:none;background:#abcdef"> 
还没有 
</p> 
</p> 
</p>

热门AI工具

更多
DeepSeek
DeepSeek

幻方量化公司旗下的开源大模型平台

豆包大模型
豆包大模型

字节跳动自主研发的一系列大型语言模型

通义千问
通义千问

阿里巴巴推出的全能AI助手

腾讯元宝
腾讯元宝

腾讯混元平台推出的AI助手

文心一言
文心一言

文心一言是百度开发的AI聊天机器人,通过对话可以生成各种形式的内容。

讯飞写作
讯飞写作

基于讯飞星火大模型的AI写作工具,可以快速生成新闻稿件、品宣文案、工作总结、心得体会等各种文文稿

即梦AI
即梦AI

一站式AI创作平台,免费AI图片和视频生成。

ChatGPT
ChatGPT

最最强大的AI聊天机器人程序,ChatGPT不单是聊天机器人,还能进行撰写邮件、视频脚本、文案、翻译、代码等任务。

相关专题

更多
js正则表达式
js正则表达式

php中文网为大家提供各种js正则表达式语法大全以及各种js正则表达式使用的方法,还有更多js正则表达式的相关文章、相关下载、相关课程,供大家免费下载体验。

524

2023.06.20

js获取当前时间
js获取当前时间

JS全称JavaScript,是一种具有函数优先的轻量级,解释型或即时编译型的编程语言;它是一种属于网络的高级脚本语言,主要用于Web,常用来为网页添加各式各样的动态功能。js怎么获取当前时间呢?php中文网给大家带来了相关的教程以及文章,欢迎大家前来学习阅读。

454

2023.07.28

js 字符串转数组
js 字符串转数组

js字符串转数组的方法:1、使用“split()”方法;2、使用“Array.from()”方法;3、使用for循环遍历;4、使用“Array.split()”方法。本专题为大家提供js字符串转数组的相关的文章、下载、课程内容,供大家免费下载体验。

618

2023.08.03

js是什么意思
js是什么意思

JS是JavaScript的缩写,它是一种广泛应用于网页开发的脚本语言。JavaScript是一种解释性的、基于对象和事件驱动的编程语言,通常用于为网页增加交互性和动态性。它可以在网页上实现复杂的功能和效果,如表单验证、页面元素操作、动画效果、数据交互等。

5736

2023.08.17

js删除节点的方法
js删除节点的方法

js删除节点的方法有:1、removeChild()方法,用于从父节点中移除指定的子节点,它需要两个参数,第一个参数是要删除的子节点,第二个参数是父节点;2、parentNode.removeChild()方法,可以直接通过父节点调用来删除子节点;3、remove()方法,可以直接删除节点,而无需指定父节点;4、innerHTML属性,用于删除节点的内容。

491

2023.09.01

js截取字符串的方法
js截取字符串的方法

js截取字符串的方法有substring()方法、substr()方法、slice()方法、split()方法和slice()方法。本专题为大家提供字符串相关的文章、下载、课程内容,供大家免费下载体验。

217

2023.09.04

Js中concat和push的区别
Js中concat和push的区别

Js中concat和push的区别:1、concat用于将两个或多个数组合并成一个新数组,并返回这个新数组,而push用于向数组的末尾添加一个或多个元素,并返回修改后的数组的新长度;2、concat不会修改原始数组,是创建新的数组,而push会修改原数组,将新元素添加到原数组的末尾等等。本专题为大家提供concat和push相关的文章、下载、课程内容,供大家免费下载体验。

240

2023.09.14

js截取字符串的方法介绍
js截取字符串的方法介绍

JavaScript字符串截取方法,包括substring、slice、substr、charAt和split方法。这些方法可以根据具体需求,灵活地截取字符串的不同部分。在实际开发中,根据具体情况选择合适的方法进行字符串截取,能够提高代码的效率和可读性 。

296

2023.09.21

pixiv网页版官网登录与阅读指南_pixiv官网直达入口与在线访问方法
pixiv网页版官网登录与阅读指南_pixiv官网直达入口与在线访问方法

本专题系统整理pixiv网页版官网入口及登录访问方式,涵盖官网登录页面直达路径、在线阅读入口及快速进入方法说明,帮助用户高效找到pixiv官方网站,实现便捷、安全的网页端浏览与账号登录体验。

1127

2026.02.13

热门下载

更多
网站特效
/
网站源码
/
网站素材
/
前端模板

精品课程

更多
相关推荐
/
热门推荐
/
最新课程
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号