switch
来源:互联网 发布:免费彩票预测软件 编辑:程序博客网 时间:2024/06/07 19:22
<html>
<head>
<meta charset="utf-8">
<title>js</title>
</head>
<body>
<p>点击下面的按钮,会显示出基于今日日期的消息:</p>
<button onclick="myFunction()">点击这里</button>
<p id="demo"></p>
<script>
function myFunction()
{
var x;
var d=new Date().getDay();
switch (d)
{
case 2:
case 3:
case 4:
case 6:
x="Today it's Saturday";
break;
case 0:
x="Today it's Sunday";
break;
default:
x="Looking forward to the Weekend";
}
document.getElementById("demo").innerHTML=x;
}
</script>
<?php
switch ($i)
{
case 0:
case 1:
case 2:
echo "i is less than 3 but not negative";
break;
case 3:
echo "i is 3";
}
?>
</body>
</html>
<head>
<meta charset="utf-8">
<title>js</title>
</head>
<body>
<p>点击下面的按钮,会显示出基于今日日期的消息:</p>
<button onclick="myFunction()">点击这里</button>
<p id="demo"></p>
<script>
function myFunction()
{
var x;
var d=new Date().getDay();
switch (d)
{
case 2:
case 3:
case 4:
case 6:
x="Today it's Saturday";
break;
case 0:
x="Today it's Sunday";
break;
default:
x="Looking forward to the Weekend";
}
document.getElementById("demo").innerHTML=x;
}
</script>
<?php
switch ($i)
{
case 0:
case 1:
case 2:
echo "i is less than 3 but not negative";
break;
case 3:
echo "i is 3";
}
?>
</body>
</html>
0 0
- switch
- Switch
- Switch
- switch
- switch
- switch
- Switch
- switch
- switch
- switch
- SWITCH
- Switch
- switch
- switch
- switch
- (switch)
- switch
- switch
- 朴素贝叶斯模型预测 Titanic 遇难人员
- switch
- 树莓派开发(三)----电脑上传文件到树莓派
- 慕课网 Python 开发简答爬虫课程笔记
- 排序算法之冒泡排序
- switch
- 小知识1
- 第三章 简单的爬虫架构
- Android开发利用七牛云平台上传图片到远程服务器算法
- 第四章 URL管理器和实现方法
- 谈谈 a += 1 和 a = a + 1 的区别?
- 第五章 网页下载器和urllib2模块
- git日常操作
- 第六章 网页解析器和BeautifulSoup第三方插件