php、javascript、asp倍数循环例子比较

引用请注明出处: https://seonoco.com/blog/1228

NOCO发布于 分类 PHP

579天前 有1个用户阅读过

本文来自我的百度空间博客详情

2007年开始使用的是 hi.baidu.com/udjy
后来百度空间强制升级为轻博客 hi.baidu.com/imnoco
2015年百度关闭了百度空间

<?
for($i=1; $i<=20; $i++){
if($i%3==0){
echo $i."<br>\n";
}
}
?>

---低调的分割线------------------------------

<script type="text/javascript">
for(var i=3; i<=20; i++)
{
if(i%3 ==0){
document.write(i + '<br />')
}
}
</script>

---低调的分割线------------------------------

<script type="text/javascript">
var i;
for(i=3; i<=20; i=i+3){
document.write(i + '<br />')
}
</script>

---低调的分割线------------------------------

<%
dim a
for a=3 to 20 step 3
response.write(a&"<br>"&vbcrlf)
next
%>

---低调的分割线------------------------------

<%
dim b
for b=1 to 10
response.write(b)
        if b mod 2=0 then
        response.write("<br>")
        end if
next
%>

---低调的分割线------------------------------

<%
dim b
for b=1 to 10
'response.write(b)
        if b mod 2=0 then
        response.write(b&"<br>")
        end if
next
%>

-- The End --

本文标题: php、javascript、asp倍数循环例子比较

本文地址: https://seonoco.com/blog/1228

本文是否有所帮助?
点赞 0
感谢支持
0
多谢反馈
评论 0
打赏

支持微信/支付宝

评论

网友