日期:2014-05-16 浏览次数:20451 次
<script type="text/javascript"> function getName() { var the_name = prompt("what's your name?",""); var dog_name = getDogName(); alert(the_name + " has a dog named " + dog_name); } function getDogName() { var the_name = prompt("what's your dog name?","") return the_name; } </script>