写一个函数,告知你选的小动物的叫声

<html>
<head>



</head>
<body >

<script type="text/javascript">
 
function scream(animal) {
switch(animal){
case "dog":
document.write('wangwang');
return;
case "cat":
document.write('miao');
return;
case "sheep":
document.write('mie~mie~');
return;
}
}
 
 
</script>

</body>
</html>

猜你喜欢

转载自www.cnblogs.com/yezhengxun/p/10481362.html