正则判断被除数不为0
以下是一个简易计算器 如何写判断被除数不为0的正则表达式,或者有更好的方式就是让被除数不为0  我只会两个数计算的被除数不为零  求多个 大神可qq403281668  求详解
<html>  
<head>  
<script type="text/jscript" language="javascript">  
var n1="",n2="";  
var item1_flag=true;  
var opr_type='+';  
function SetVal(item){  
   document.Cal.OutText.value+=item;  
   if(item1_flag)  
     n1+=item;  
   else  
    n2+=item;  
}  
function SetOpr(opr){  
   document.Cal.OutText.value+=opr;  
   item1_flag=false;  
   opr_type=opr;  
}  
function Clear(){  
   document.Cal.OutText.value="";  
   item1_flag=true;  
   opr_type='+';  
   n1="";  
   n2="";  
}  
function Compute(){  
   var result;  
   if((n1!="")&&(n2!="")){  
     if((eval(n2)==0)&&(opr_type=='/'))
     {
       alert('除数不能为0!');
       Clear();
       return;  
     }  
     else  
     {
       result=eval(document.Cal.OutText.value);  
       document.Cal.OutText.value+='='+result;  
     }  
   }  
}  
</script></head>  
<body>  
<div align="center">
<font size="7" color="#000000" face="隶书">简易计算器</font></div>
<hr color="#0000FF" border="2"><br/><br/><br/>
<form name="Cal"> <p align="center">
<input type="text" value="" name="OutText"><br/><br/>
<input type="button" id="button" style="width:30px;height:20px;font-size:16px; background-color:#00FF66; " onClick="SetVal('0')" value="0">   
<input type="button"id="button" style="width:30px;height:20px;font-size:16px; background-color:#00FF66" value="1" onClick="SetVal('1')"> 
<input type="button" id="button" style="width:30px;height:20px;font-size:16px; background-color:#00FF66" value="2" onClick="SetVal('2')">   
<input type="button"id="button" style="width:30px;height:20px;font-size:16px; background-color:#00FF66" value="3" onClick="SetVal('3')"><br/><br/>
<input type="button"id="button" style="width:30px;height:20px;font-size:16px; background-color:#00FF66" value="4" onClick="SetVal('4')">    
<input type="button"id="button" style="width:30px;height:20px;font-size:16px; background-color:#00FF66" value="5" onClick="SetVal('5')">   
<input type="button"id="button" style="width:30px;height:20px;font-size:16px; background-color:#00FF66"value="6" onClick="SetVal('6')">   
<input type="button"id="button" style="width:30px;height:20px;font-size:16px; background-color:#00FF66" value="7" onClick="SetVal('7')"><br/><br/>
<input type="button"id="button" style="width:30px;height:20px;font-size:16px; background-color:#00FF66" value="8" onClick="SetVal('8'