[求助]流动公告如何引用数据库
如何在下面流动公告中引用SQL中数据,数据库中有标题、URL地址。请各位大侠帮助修改。谢谢!!!
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
<meta name="Microsoft Border" content="r, default">
</head>
<body>
<script language=javascript>
var index = 7
link = new Array(6);
text = new Array(6);
link[0] ='sample1.htm'
link[1] ='sample2.htm'
link[2] ='sample3.htm'
link[3] ='sample4.htm'
link[4] ='sample5.htm'
link[5] ='sample6.htm'
link[6] ='sample7.htm'
text[0] ='新闻1'
text[1] ='新闻2'
text[2] ='新闻3'
text[3] ='新闻4'
text[4] ='新闻5'
text[5] ='新闻6'
text[6] ='新闻7'
document.write ("<marquee scrollamount='1' scrolldelay='100' direction= 'up' width='150' height='150'>");
for (i=0;i<index;i++){
document.write (" <img src='img/little.gif' width='12' height='12'> <a href="+link[i]+" target='_blank'>");
document.write (text[i] + "</A><br>");
}
document.write ("</marquee>")
</script>
</body></html>