日期:2014-05-20  浏览次数:20708 次

一个棘手的问题
5610926,5592498,5592185,5594607,5594780,5595273,5596167,5596470,5596553,5598765,5598617,5598715,5600468,5600841,5600895,5602247,5602107,5602416,5603144,5603330,5603352,5603869,5604068,5604071,5604467,5604586,5604572,5604887,5604944,5604967,5605197,5605255,5605297,5605552,5605625,5605679,5605929,5606076,5606092,5606378,5606668,5606652,5607568,5611395,5607975,5608956,5608910,5609107,5610148,5610243,5610194,5610976

这是一段数字?OK,不用我所,这些是播放地址,每个逗号之前之后的那串数字就是一个播放地址
比如:
http://www.56.com/play.swf?iid=5610926
http://www.56.com/play.swf?iid=5592498
1、统计这段数字串里面有多少个播放地址得到数字i
2、列组I,DO   while
播放地址:
<input   type= "text "   name= "onlineurla '+i+ ' "   class= "button "   style= "padding-left:1pt "       size=50   value= " '第 '+i+ '的播放地址 ">
第 <input   type= "text "   name= "downnoa '+i+ ' "   class= "button "     style= "padding-left:1pt "   size=3   value= " '+i+ ' "> 集   <BR>

谁有办法吗?
用下面代码开始写
<script   language= "javascript ">
function

谢谢

------解决方案--------------------
<script language= "javascript ">
function createTexts(){
var sAddrs = "5610926,5592498,5592185,5594607,5594780,5595273,5596167,5596470,5596553,5598765,5598617,5598715,5600468,5600841,5600895,5602247,5602107,5602416,5603144,5603330,5603352,5603869,5604068,5604071,5604467,5604586,5604572,5604887,5604944,5604967,5605197,5605255,5605297,5605552,5605625,5605679,5605929,5606076,5606092,5606378,5606668,5606652,5607568,5611395,5607975,5608956,5608910,5609107,5610148,5610243,5610194,5610976 ";
var arrAddrs = sAddrs.split( ", ");
for(var i=0; i <arrAddrs.length; i++){
var sInput = " <input type=\ "text\ " name=\ "onlineurla " + i + "\ " class=\ "button\ " style=\ "padding-left:1pt\ " size=50 value=\ "第 " + i + "的播放地址\ "> ";
document.write(sInput);
sInput = "第 <input type=\ "text\ " name=\ "downnoa " + i + "\ " class=\ "button\ " style=\ "padding-left:1pt\ " size=3 value=\ " " + i + "\ "> 集 <BR> ";
document.write(sInput);
}

}
createTexts();
</script>
------解决方案--------------------
顶。。。。。