HTML: <HTML> <HEAD> <TITLE> 新帖调用 </TITLE> </HEAD> <BODY> <script src="http://bbs.chinahtml.com/external.php?type=js" type="text/javascript"></script> <script type="text/javascript"> <!-- for (i in threads) { document.writeln(threads[i].title + " (" + threads[i].poster + ")<br />"); } //--> </script> </BODY> </HTML>
直接这样就OK ,咋回事? HTML: <HTML> <HEAD> <TITLE> 新帖调用 </TITLE> </HEAD> <BODY> <script type="text/javascript"> <!-- function thread(threadid, title, poster, threaddate, threadtime) { this.threadid = threadid; this.title = title; this.poster = poster; this.threaddate = threaddate; this.threadtime = threadtime; } var threads = new Array(15); threads[0] = new thread(7320, '出错了!', 'bigban', '2005-11-26', '19:25'); threads[1] = new thread(7319, '谁提供TM模板分享一下!', '傻猪漂流记', '2005-11-26', '19:16'); threads[2] = new thread(7318, '汗啊...原来alexa作弊这么牛', 'leoben', '2005-11-26', '18:51'); threads[3] = new thread(7317, '整合VBB的多用户blog和相册', 'noo', '2005-11-26', '18:51'); threads[4] = new thread(7316, '没人说话我看鬼故事去', '夜玫瑰', '2005-11-26', '18:09'); threads[5] = new thread(7315, '今天睡觉应该不会失眠了,吃了感冒药', 'diefish', '2005-11-26', '18:05'); threads[6] = new thread(7314, '秋千', 'diefish', '2005-11-26', '18:04'); threads[7] = new thread(7313, '微软的输入法也挺好用的', '老鬼', '2005-11-26', '17:49'); threads[8] = new thread(7312, '你们先灌会,我吃饭了', 'diefish', '2005-11-26', '17:26'); threads[9] = new thread(7311, '习惯是会让曾经的激情和美好想象都消失在自己手中', 'diefish', '2005-11-26', '17:24'); threads[10] = new thread(7310, '觉得后弦比JAY那SB强的站出来说句话', 'diefish', '2005-11-26', '17:23'); threads[11] = new thread(7309, '帝国这样灌水是有险恶用心的', 'diefish', '2005-11-26', '17:18'); threads[12] = new thread(7308, '这么灌下去……真木意思啊', 'diefish', '2005-11-26', '17:16'); threads[13] = new thread(7307, '帝国网站管理系统3.6在线演示[正式版]', 'wm_chief', '2005-11-26', '17:08'); threads[14] = new thread(7306, '同上', 'diefish', '2005-11-26', '17:07'); for (i in threads) { document.writeln(threads[i].title + " (" + threads[i].poster + ")<br />"); } //--> </script> </BODY> </HTML>