求解 怎么写

<script>

function JobTime(year,month,date){

            var a=parseInt(year),

                 b=parseInt(month),

                 c=parseInt(date);

           var today=new Date();

                 today.setFullYear(a+3);

                 today.setMonth(b+1);

                 today.setDate(c);

                 return "该员工的合同到期日期为"+today.getFullYear()+"-"+today.getMonth()+"-"+today.getDate()

            }

        /*     下面这一段该怎么写让用户输入的值能与函数的参数对应起来       */

                var get=JobTime(prompt("请输入年份";"请输入月份";"请输入日期"))

               document.write(get)

</script>


慕圣2157743
浏览 534回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript