السلام عليكم
أعمل حاليا على مشروع واستخدم فية الجافا سكربت
واجهتني فية مشكلة :(
وهي
لدي function Cal() و function callfunctioncal()
الفنكشن function callfunctioncal() يتم استدعائها عند تحميل الصفحة
وايضا في الفنكشن function callfunctioncal() لدي button اذا تم الضغط عليه يتم استدعاء function Cal()
لكن الاستدعاء الثاني الخاص ب function Cal لا يعمل ولا أعرف مالمشكلة :(
وهذا هو الكود
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1256">
<title>ConfirmationPage</title>
<script type="text/javascript">
function Cal()
{ document.writeln("<br />"+" the function is call "+"<br />");
var time = new Date();
//sec.disabled=false;
//return time
//document.writeln("<br />"+"<input id=hour name=hour type=text/>"+"<br />");
document.writeln("<br />"+" -End of function cal -- "+"<br />");
}
function callfunctioncal()
{document.writeln("<br />"+" * the function callfunctioncal is called * "+"<br />");
document.writeln("<br />"+"<input name=butt type=button value='OK I am sure' onclick='Cal()'/>"+"<br />");
document.writeln("<br />"+"***-End of callfunctioncal -*** "+"<br />");
}
</script>
</head>
<body onload= "callfunctioncal()" dir="rtl">
</body>
</html>
<html dir="rtl" xmlns = "http://www.w3.org/1999/xhtml" >
أرجو منكم مساعدتي
وجزيتم خيرا