السلام عليكــم ورحمـة الله وبركاتــه ،،
وددت ان تشاركوني في البحث عن المشكلة لانني كل مااشوف الكود احس انه صح
لم اتمكن من رفعة بالمرفقات كتبت لكم الكود
<html>
<head><title>Bank</title>
<script language="JavaScript">
var customr=new Object();
var d=new Date();
var acc1;
var da1;
var mon1;
var yea1;
var id1=200;
function Customr(acc1,da1,mon1,yea1)
{
this.acc=acc1;
this.da=da1;
this.mon=mon1;
this.yea=yea1;
this.id=id1;
id1=id1+1;
}
"var pass ="123";
var userpass=prompt("enter password","");
while(pass != userpass){
alert("wrong password");
userpass=prompt("enter password","");
}
alert("right password \n hello on my page");
function newacc()
{
var name=prompt("enter name of customer NO "+id1,"");
acc1=prompt("enter balance of customer NO "+id1,"");
da1=prompt("enter day","");
mon1=prompt("enter month","");
yea1=prompt("enter year","");
if( (name=="" ) || (acc1=="") || (da1=="") || (mon1=="") ||(yea1=="") )
{alert("must enter all information");}
d.setDate(da1);
d.setMonth(mon1);
d.setFullYear(yea1);
if(acc1<1000)
{alert("balance must more 1000 SR");}
customr[name]=new Customr(acc1,da1,mon1,yea1);
}
function shoacc()
{
if( var p1 in customr)
{
for(var p2 in customr )
{alert("Customer No "+customr[p2].id+" Name : "+p2+"Balance" +customr[p2].acc+" Date "+d.toDateString());}
}
else
alert("you do not enter any customer");
}
function widm()
{
var n1=prompt("enter name of customer ","");
if(n1 in customr)
{
var m=prompt("enter money of customer ","");
if(m>=customr[n1].acc)
{alert("sorry,your can not do that");}
else
{customr[n1].acc=customr[n1].acc-m;
alert("the balance is "+customr[n1].acc);}
}
else
alert("not found cusyomer ");
}
function depm()
{
var n2=prompt("enter name of customer ","");
if(n2 in customr)
{
var m1=prompt("enter money of customer ","");
customr[n2].acc=customr[n2].acc+m1;
alert("the balance is "+customr[n2].acc);
}
else
alert("not found cusyomer ");
}
</script>
</head>
<body>
<p align="center">
<form name="f">
<font size="30" > Hello On My Bank</font><br>
<hr width="100%" size="2"><br><br><br><br>
<p align="center">
<br><input type="button" name="b1" onclick="newacc()" value="New Account" ><br><br><br>
<input type="button" name="b2" onclick="shoacc()" value="Show Customer" ><br><br><br>
<input type="button" name="b3" onclick="widm()" value="Withdraw Money" ><br><br><br>
<input type="button" name="b4" onclick="depm()" value="Deposit Money" ><br><br><br>
</form>
</p>
</body>
</html>ولكن المشكلو مايطبق
لانه يتم فتحة باستخدام انترنت اكسبرولو وماايحدد لي اين الخطأ
جزاكم الله خير
وشكراً
