原xml文件格式(地址和标题是我随便写的)
xml version="1.0" encoding="utf-8
<vcaster>
<item item_url="../flv/123.flv" item_title="123"></item>
</vcaster>
}
我现在写了一个但好像不对
function flvlist($name,$t) {
document.write("<?xml version="1.0" encoding="utf-8"?>")
document.write("<vcaster>")
document.write("<item item_url="../flv/"+&name+".flv" item_title="+$t+"></item>")
document.write("</vcaster>")
}
声明一个flvlist函数使用name和t作参数。
用途:用于做FLV播放器的播放列表
请给位给个正确的。
xml version="1.0" encoding="utf-8
<vcaster>
<item item_url="../flv/123.flv" item_title="123"></item>
</vcaster>
}
我现在写了一个但好像不对
function flvlist($name,$t) {
document.write("<?xml version="1.0" encoding="utf-8"?>")
document.write("<vcaster>")
document.write("<item item_url="../flv/"+&name+".flv" item_title="+$t+"></item>")
document.write("</vcaster>")
}
声明一个flvlist函数使用name和t作参数。
用途:用于做FLV播放器的播放列表
请给位给个正确的。
<!--
function flvlist($name,$t) {
var fso, tf; fso = new ActiveXObject("scripting.FileSystemObject"); // 创建新文件 tf = fso.CreateTextFile("c:\\test.xml", true); // 填写数据,并增加换行符 tf.WriteLine("<?xml version=\"1.0\" encoding=\"utf-8\"?>") ;
tf.WriteLine("<vcaster>");
//tf.WriteLine("<item item_url=\"../flv/\"+$name+".flv" item_title="+$t+"></item>");
tf.WriteLine("<item item_url=\"../flv/"+$name+".flv\""+" item_title=\"" + $t + "\"></item>");
tf.WriteLine("</vcaster>");// 关闭文件 tf.Close(); }flvlist("aa","bb");
-->
</script>
//----------------------
//为什么要在客户端生成文件呢?