原产地是中国的农作物:js 代码不能和数据库一起更新是怎么回事呢?

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/29 06:04:34
有几个js 代码,不能和数据库一起更新,但页面内容能随js代码更新。是怎么回事呢?

<!--

var onecount2;

var subcat2 = new Array();

subcat2[0] = new Array('四川','成都市');

subcat2[1] = new Array('广西','南宁市');

subcat2[2] = new Array('上海','黄浦区');
...............
subcat2[523] = new Array('重庆','彭水县');

subcat2[524] = new Array('重庆','其他');

onecount2=525;

function changelocation2(locationid)

{

document.frmWz114.selSecondArea.length = 1;

var locationid=locationid;

var i;

var strGetStr;

strGetStr='';

for (i=0;i<onecount2;i++)

{

if (subcat2[i][0] == locationid)

{

document.frmWz114.selSecondArea.options[document.frmWz114.selSecondArea.length] = new Option(subcat2[i][1], subcat2[i][1]);

if (strGetStr==''){

strGetStr=subcat2[i][1];

}

}

}

changelocation3(locationid,strGetStr);

}
var onecount3;

var subcat3 = new Array();

subcat3[0] = new Array('广东','广州市','天河区');

subcat3[1] = new Array('河北','邢台市','任县');
................
subcat3[18] = new Array('河北','邢台市','广宗');

subcat3[19] = new Array('河北','邢台市','南和');

onecount3=20;

function changelocation3(locationfirstid,locationid)

{

document.frmWz114.selThirdArea.length = 1;

var locationid=locationid;

var locationfirstid=locationfirstid;

var i;

for (i=0;i<onecount3; i++)

{

if (subcat3[i][0] == locationfirstid && subcat3[i][1] == locationid)

{

document.frmWz114.selThirdArea.options[document.frmWz114.selThirdArea.length] = new Option(subcat3[i][2], subcat3[i][2]);

}

}

}

谢谢,朋友们给看看。
在后台管理中不能更新前台的静态网页。
是因为不能更新js代码的原因吗?
怎么才能更新呢?

你的这个JS代码不是用数据库调用的。而是在JS文件中编写的。如果更改的到JS文件中去更改,而你现在的数据库只是更改其文章的内容,不包括这个JS分类。