君临臣下之煮酒论手机:HTML直接解析了

来源:百度文库 编辑:神马品牌网 时间:2024/04/20 16:19:06
源码如下:
Make_All="document.write('<SELECT name=ChannelID id=ChannelID>');document.write('<option value=0>(无)作为一级</option>');document.write('"
Make_All=Make_All&ShowSort(0,1)
Make_All=Make_All&"');document.write('</select>');"
set fso=fs.opentextfile(server.MapPath("ClassList_All.js"),2,true)
fso.write Make_all

其中:ShowSort(0,1)解析后是HTML标记。如<option></option>

但生成的JS文件只有<select>和</select>,中间那些HTML直接在当页解析运行了。
不知道能不能看明我说什么,太乱了。
中间那里解析后是这样的:
document.write('<option>...</option>');
这已经有单引号了,还是这样。
******************************************
我是在ASP中运行,把解析后的内容写成JS文件,在另外的页面用:<script src=*.js></script>调用。
现在问题是能生成JS文件到服务器,但JS文件没有内容,只有<select></select>这个标记,中间<option></option>这个标记的内容没有生成.

<script>
Make_All="document.write('<SELECT name=ChannelID id=ChannelID>');document.write('<option value=0>(无)作为一级</option>');document.write('"
Make_All=Make_All&ShowSort(0,1)
Make_All=Make_All&"');document.write('</select>');"
set fso=fs.opentextfile(server.MapPath("ClassList_All.js"),2,true)
fso.write Make_all
</script>
如果你将这些保存为一个JS文件,在它页调用此JS,也要保证它页有这两个标记才行.

晕了,是不行。我不知道,知道和话跟我说声,谢谢了~