asp中如何引用javascript脚本呀,例如我要从数据库表中读取十条数据,把他们赋给用javascript写的数组
怎么写语句呀:<%whilenotrst1.eof%><scriptlanguage=JavaScriptr>varmarkerArr=[{title:"<%=rst("...
怎么写语句呀: <% while not rst1.eof %> <script language=JavaScriptr > var markerArr = [
{title:"<%=rst("title")%>",content:"<%=rst("content")%>",point:"116.834709|33.99475",isOpen:0,icon:{w:21,h:21,l:0,t:0,x:6,lb:5}}
];
</script>
<% rst1.movenext
wend %> 这样不行 展开
{title:"<%=rst("title")%>",content:"<%=rst("content")%>",point:"116.834709|33.99475",isOpen:0,icon:{w:21,h:21,l:0,t:0,x:6,lb:5}}
];
</script>
<% rst1.movenext
wend %> 这样不行 展开
2个回答
展开全部
<script language=JavaScriptr > var markerArr = [
<% while not rst1.eof %>
{title:"<%=rst("title")%>",content:"<%=rst("content")%>",point:"116.834709|33.99475",isOpen:0,icon:{w:21,h:21,l:0,t:0,x:6,lb:5}}
<% rst1.movenext
if Not rs.EOF Then Response.write ","
wend %>
];
</script>
<% while not rst1.eof %>
{title:"<%=rst("title")%>",content:"<%=rst("content")%>",point:"116.834709|33.99475",isOpen:0,icon:{w:21,h:21,l:0,t:0,x:6,lb:5}}
<% rst1.movenext
if Not rs.EOF Then Response.write ","
wend %>
];
</script>
展开全部
Response.write
<script language=JavaScriptr > var markerArr = [
{title:"<%Response.write(rst("title"))%>",content:"<%=Response.write(rst("content"))%>",point:"116.834709|33.99475",isOpen:0,icon:{w:21,h:21,l:0,t:0,x:6,lb:5}}
];
</script>
<script language=JavaScriptr > var markerArr = [
{title:"<%Response.write(rst("title"))%>",content:"<%=Response.write(rst("content"))%>",point:"116.834709|33.99475",isOpen:0,icon:{w:21,h:21,l:0,t:0,x:6,lb:5}}
];
</script>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询