JavaScript的并且&&

<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<style type="text/css">
    #div1 {
        width: 300px;
        height: 80px;
        border: 1px solid red;
    }
</style>
</head>

<body>
<input type="text"  />
<input type="button"  value="提交" />
<br>
<br>
<div ></div>
<script type="text/javascript">
    var oput=document.getElementById('put');
    var odiv=document.getElementById('div1');
    var oput1=document.getElementById('put1');
    oput1.onclick=function()
    {
    var i=oput.value;
    if(i>9 && i<100)/*(i>9 && i<100)*/
        {
            odiv.innerHTML='两位数'
        }
    else
        {
            odiv.innerHTML='不是两位数'
        }
    }
</script>
</body>
</html>

查看原文