分类：电脑/网络-程序设计-JAVA相关
问题：缺少对象第十行怎样改呀。&lt;scriptlanguage="? 
缺少对象第十行怎样改呀。<script ="javascript">function isdiv(x,y){ return(x%y==0) } </script><script language="javascript">function isprime(x){for(var i=3;i<(i-1);i++)if(isdiv(x, i)==0) return false;return true;}</script>&lt缺少对象第十行怎样改呀。<script ="javascript">function isdiv(x,y){ return(x%y==0) } </script><script language="javascript">function isprime(x){for(var i=3;i<(i-1);i++)if(isdiv(x, i)==0) return false;return true;}</script><script language="javascript">x=7alert(isprime(x))</script>
回答：<script language="javascript">
function isdiv(x,y){
return(x%y==0)
}
</script>
<script language="javascript">

function isprime(x)
{
for(var i=2;i<=Math.sqrt(x);i++)
if(isdiv(x, i)) return false;

return true;
}
</script>
<script language="javascript">
x=7
alert(isprime(x))
</script>