日期:2014-05-16  浏览次数:20710 次

PHP转到ASP代码
<?php
$arr = array(1,2,3,4,5,6,7,8,9,10);
$fenlei_arr = array("lenfei1","lenfei2","lenfei3");
echo "<ul id='newUrl' onMouseOut=\"Over()\">";
foreach($fenlei_arr as $key=>$fenlei){
    echo "<li onMouseOver=\"Over(this)\" onclick=\"val(this)\">在<a>".$fenlei."</a>分类中查找</li>";
}
foreach($arr as $key=>$keyword){
    echo "<li onMouseOver=\"Over(this)\" onclick=\"val(this)\"><a>".$keyword."</a></li>";
}
echo "</ul>";
?>

这一段代买如果要改为ASP,是什么样子的?
------解决方案--------------------
<%
dim arr,fenlei_arr,i
arr=split("1,2,3,4,5,6,7,8,9,10",",")
fenlei_arr=split("lenfei1,lenfei2,lenfei3",",")
Response.write "<ul id='newUrl' onMouseOut=""Over()"">"
for i=0 to ubound(fenlei_arr)
    Response.write "<li onMouseOver=""Over(this)"" onclick=""val(this)"">在<a>"&fenlei_arr(i)&"</a>分类中查找</li>"
next
for i=0 to ubound(arr)
    Response.write "<li onMouseOver=""Over(this)"" onclick=""val(this)""><a>"&arr(i)&"</a></li>"
next
Response.write "</ul>"
%>