写一个函数,告知你选的小动物的叫声
作者:互联网
<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>
</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>
标签:case,return,函数,mie,write,叫声,animal,告知,document 来源: https://www.cnblogs.com/yezhengxun/p/10481362.html