js prompt函数使用例子

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<script>

var  num; 



var theResponse = window.prompt("移动车辆至新的会员名下,请输入会员memNo号: ","");

if(theResponse == null || theResponse == "" || isNaN(theResponse)){ 

    alert('num为空,不是数字'); 

}else{

    alert("theResponse$$:" + theResponse);

}

</script>

</head>

<body>

</body>

</html>

 

你可能感兴趣的:(prompt)