asp与js问题
<linkrel="stylesheet"type="text/css"href="http://esf.nc.soufun.com/newsecond/Styles/h...
<link rel="stylesheet" type="text/css" href="http://esf.nc.soufun.com/newsecond/Styles/hdPic.css"/>
<dt class="dashedb">外景图</dt><dd>
<div id="photo-warp" style="background:url(http://img.soufun.com/secondhouse/image/newdetails/loader.gif) no-repeat center center">
<div class="photo-warp-inner" id="photo-warp-inner" style="visibility:hidden;">
<div class="mainArea" id="mainArea">
<div id="preArrow" title="上一张"></div>
<div id="nextArrow" title="下一张"></div>
<div id="gotolast"></div>
<div id="gotolast_inner">
<p>已经浏览到最后一张,您可以</p>
<a href="#p=1" id="rePlay">重新欣赏</a>
<a href="http://esf.nc.soufun.com/housing/2310246906/p2_1/" id="urlgoto" target ="_blank">查看更多外景图</a>
</div>
<a href="javascript:void(0);" id="bigHref"><img src="http://img.soufun.com/secondhouse/image/newdetails/loader.gif" id="Display" style="cursor:pointer;margin:0 auto;visibility:hidden;" title="点击浏览下一张" onErr="http://img.soufun.com/secondhouse/image/newdetails/loader.gif"/></a>
<div id="loading" style="display:none"></div>
<div class="picTips picTips_png" id="picTips">
<div class="titleArea" id="titleArea"></div>
</div>
<div href="javascript:void(0);" class="buttonArea" id="buttonArea" title="隐藏图片注释">隐藏</div>
<div class="openTips" style="display:none" id="openTips" title="打开图片注释">查看图注</div>
</div>
<div class="blank"></div>
<div class="photoList-wrap">
<a href="javascript:void(0)" class="photo-Up" id="Up" onfocus='this.blur()' title="向前"></a>
<div class="photo-List" id="photo-List">
<ul id="smallPhoto"></ul>
<div id="noDiv"></div>
</div>
<a href="javascript:void(0)" class="photo-Down" id="Down" onfocus='this.blur()' title = "向后"></a></div>
<div id="scrollbar"><a href="javascript:void(0)" id="scrollbar-in" title="拖动工具条以快速查看图片"></a></div>
</div>
</div>
<div id="flashCff"></div>
<script>function ResumeError() {return true;}window.onerror = ResumeError;</script>
<script> var GroupjsUrl = "http://esf.nc.soufun.com/newsecond/scripts/hdPic.js";//小图移动</script>
<script>
//图片和图片描述
var isLoadData = false;var photoJson = [{showtit:'洪城比华利外景图',showtxt:'',smallpic:'http://imgs.soufun.com/house/2009_04/15/nanchang/1239780046178_000_s.jpg','bigpic':'http://imgs.soufun.com/house/2009_04/15/nanchang/1239780046178_000.jpg'},{showtit:'洪城比华利外景图',showtxt:'',smallpic:'http://imgs.soufun.com/house/2008_07/03/nanchang/1215075330206_000_s.jpg','bigpic':'http://imgs.soufun.com/house/2008_07/03/nanchang/1215075330206_000.jpg'},{showtit:'洪城比华利外景图',showtxt:'',smallpic:'http://imgs.soufun.com/house/2009_04/15/nanchang/1239780054974_000_s.jpg','bigpic':'http://imgs.soufun.com/house/2009_04/15/nanchang/1239780054974_000.jpg'}];
isLoadData = true;
</script>
<script>
var imgurl='http://esf.nc.soufun.com/housing/2310246906/p2_1/';
function GroupLoadJs(file,callback) {
var head = document.getElementsByTagName('head')[0];
var js = document.createElement('script');
js.setAttribute('type','text/javascript');
js.setAttribute('src',file);
head.appendChild(js);
js.onload = js.onreadystatechange = function() {
if (js.readyState && js.readyState != 'loaded' && js.readyState != 'complete') return;
js.onreadystatechange = js.onload = null;
if (callback) callback();
}
return false;
}
GroupLoadJs(GroupjsUrl,function(){
if(isLoadData){
picShow.Picsite="";
picShow.Loader();
picShow.$("photo-warp-inner").style.visibility = "visible";
}
})
window.onload = function(){
picShow.setTit();
}
</script>
代码太长了,一次没发完,这个是搜房的图片左右移动效果,我想问下怎么把这里的图片换成从数据库里绑定的。希望有高手帮我改下,最好用asp的,.net的也行。 展开
<dt class="dashedb">外景图</dt><dd>
<div id="photo-warp" style="background:url(http://img.soufun.com/secondhouse/image/newdetails/loader.gif) no-repeat center center">
<div class="photo-warp-inner" id="photo-warp-inner" style="visibility:hidden;">
<div class="mainArea" id="mainArea">
<div id="preArrow" title="上一张"></div>
<div id="nextArrow" title="下一张"></div>
<div id="gotolast"></div>
<div id="gotolast_inner">
<p>已经浏览到最后一张,您可以</p>
<a href="#p=1" id="rePlay">重新欣赏</a>
<a href="http://esf.nc.soufun.com/housing/2310246906/p2_1/" id="urlgoto" target ="_blank">查看更多外景图</a>
</div>
<a href="javascript:void(0);" id="bigHref"><img src="http://img.soufun.com/secondhouse/image/newdetails/loader.gif" id="Display" style="cursor:pointer;margin:0 auto;visibility:hidden;" title="点击浏览下一张" onErr="http://img.soufun.com/secondhouse/image/newdetails/loader.gif"/></a>
<div id="loading" style="display:none"></div>
<div class="picTips picTips_png" id="picTips">
<div class="titleArea" id="titleArea"></div>
</div>
<div href="javascript:void(0);" class="buttonArea" id="buttonArea" title="隐藏图片注释">隐藏</div>
<div class="openTips" style="display:none" id="openTips" title="打开图片注释">查看图注</div>
</div>
<div class="blank"></div>
<div class="photoList-wrap">
<a href="javascript:void(0)" class="photo-Up" id="Up" onfocus='this.blur()' title="向前"></a>
<div class="photo-List" id="photo-List">
<ul id="smallPhoto"></ul>
<div id="noDiv"></div>
</div>
<a href="javascript:void(0)" class="photo-Down" id="Down" onfocus='this.blur()' title = "向后"></a></div>
<div id="scrollbar"><a href="javascript:void(0)" id="scrollbar-in" title="拖动工具条以快速查看图片"></a></div>
</div>
</div>
<div id="flashCff"></div>
<script>function ResumeError() {return true;}window.onerror = ResumeError;</script>
<script> var GroupjsUrl = "http://esf.nc.soufun.com/newsecond/scripts/hdPic.js";//小图移动</script>
<script>
//图片和图片描述
var isLoadData = false;var photoJson = [{showtit:'洪城比华利外景图',showtxt:'',smallpic:'http://imgs.soufun.com/house/2009_04/15/nanchang/1239780046178_000_s.jpg','bigpic':'http://imgs.soufun.com/house/2009_04/15/nanchang/1239780046178_000.jpg'},{showtit:'洪城比华利外景图',showtxt:'',smallpic:'http://imgs.soufun.com/house/2008_07/03/nanchang/1215075330206_000_s.jpg','bigpic':'http://imgs.soufun.com/house/2008_07/03/nanchang/1215075330206_000.jpg'},{showtit:'洪城比华利外景图',showtxt:'',smallpic:'http://imgs.soufun.com/house/2009_04/15/nanchang/1239780054974_000_s.jpg','bigpic':'http://imgs.soufun.com/house/2009_04/15/nanchang/1239780054974_000.jpg'}];
isLoadData = true;
</script>
<script>
var imgurl='http://esf.nc.soufun.com/housing/2310246906/p2_1/';
function GroupLoadJs(file,callback) {
var head = document.getElementsByTagName('head')[0];
var js = document.createElement('script');
js.setAttribute('type','text/javascript');
js.setAttribute('src',file);
head.appendChild(js);
js.onload = js.onreadystatechange = function() {
if (js.readyState && js.readyState != 'loaded' && js.readyState != 'complete') return;
js.onreadystatechange = js.onload = null;
if (callback) callback();
}
return false;
}
GroupLoadJs(GroupjsUrl,function(){
if(isLoadData){
picShow.Picsite="";
picShow.Loader();
picShow.$("photo-warp-inner").style.visibility = "visible";
}
})
window.onload = function(){
picShow.setTit();
}
</script>
代码太长了,一次没发完,这个是搜房的图片左右移动效果,我想问下怎么把这里的图片换成从数据库里绑定的。希望有高手帮我改下,最好用asp的,.net的也行。 展开
1个回答
展开全部
<script>
//图片和图片描述
var isLoadData = false;var photoJson = [{showtit:'洪城比华利外景图',showtxt:'',smallpic:'http://imgs.soufun.com/house/2009_04/15/nanchang/1239780046178_000_s.jpg','bigpic':'http://imgs.soufun.com/house/2009_04/15/nanchang/1239780046178_000.jpg'},{showtit:'洪城比华利外景图',showtxt:'',smallpic:'http://imgs.soufun.com/house/2008_07/03/nanchang/1215075330206_000_s.jpg','bigpic':'http://imgs.soufun.com/house/2008_07/03/nanchang/1215075330206_000.jpg'},{showtit:'洪城比华利外景图',showtxt:'',smallpic:'http://imgs.soufun.com/house/2009_04/15/nanchang/1239780054974_000_s.jpg','bigpic':'http://imgs.soufun.com/house/2009_04/15/nanchang/1239780054974_000.jpg'}];
isLoadData = true;
</script>
看上去,这段是定义图片列表的,以数组形式定义的,查询数据库,将内容循环输出就好了。
<script>
//图片和图片描述
var isLoadData = false;
var photoJson = [
<%
'查询数据库,你的数据库我不了解,就不说了
while not rs.eof
%>
{showtit:'<%=rs("图片标题")%>', showtxt:'<%=rs("图片说明")%>', smallpic:'<%=rs("小图地址")%>', 'bigpic':'<%=rs("大图地址")%>'}
<%
rs.movenext
if not rs.eof then response.write(",")
wend
rs.close
set rs=nothing
%>
];
isLoadData = true;
</script>
//图片和图片描述
var isLoadData = false;var photoJson = [{showtit:'洪城比华利外景图',showtxt:'',smallpic:'http://imgs.soufun.com/house/2009_04/15/nanchang/1239780046178_000_s.jpg','bigpic':'http://imgs.soufun.com/house/2009_04/15/nanchang/1239780046178_000.jpg'},{showtit:'洪城比华利外景图',showtxt:'',smallpic:'http://imgs.soufun.com/house/2008_07/03/nanchang/1215075330206_000_s.jpg','bigpic':'http://imgs.soufun.com/house/2008_07/03/nanchang/1215075330206_000.jpg'},{showtit:'洪城比华利外景图',showtxt:'',smallpic:'http://imgs.soufun.com/house/2009_04/15/nanchang/1239780054974_000_s.jpg','bigpic':'http://imgs.soufun.com/house/2009_04/15/nanchang/1239780054974_000.jpg'}];
isLoadData = true;
</script>
看上去,这段是定义图片列表的,以数组形式定义的,查询数据库,将内容循环输出就好了。
<script>
//图片和图片描述
var isLoadData = false;
var photoJson = [
<%
'查询数据库,你的数据库我不了解,就不说了
while not rs.eof
%>
{showtit:'<%=rs("图片标题")%>', showtxt:'<%=rs("图片说明")%>', smallpic:'<%=rs("小图地址")%>', 'bigpic':'<%=rs("大图地址")%>'}
<%
rs.movenext
if not rs.eof then response.write(",")
wend
rs.close
set rs=nothing
%>
];
isLoadData = true;
</script>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询