怎么在下面的HTML里调用数组cs[]的值
var cs=new Array(5);
var mydata="red,300,200,我爱北京天安门,http://blog.yb023.com/uploadfile/200611180016400.wma";
var cs=mydata.match(/[^,]+/g);
var obj = document.getElementById("dodododo");
obj.innerHTML = cs[3] + "
" + cs[4];
obj.style.width = cs[2];
obj.style.height = cs[1];
obj.style.backgroundColor = cs[0];
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
var cs=new Array(4);
var mydata="320,45,1,http://blog.yb023.com/uploadfile/200611180016400.wma";
var cs=mydata.match(/[^,]+/g);
var $ = function(id)
{
return document.getElementById(id);
}
$("a1").style.width = cs[0];
$("a1").style.height = cs[1];
$("a1").AutoStart = cs[2];
$("a1").url = cs[3];
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
var cs=new Array(5);
var mydata="red,300,200,我爱北京天安门,http://blog.yb023.com/uploadfile/200611180016400.wma";
var cs=mydata.match(/[^,]+/g);
var obj = document.getElementById("p");
obj.innerHTML = "
宽300,高200的表格,字体为红色
"+cs.join("\n");+" |
";
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]