View Single Post
ישן 26-07-12, 06:33   # 5
Daniel
אחראי פורום
 
מיני פרופיל
תאריך הצטרפות: Mar 2007
הודעות: 2,875

Daniel לא מחובר  

HTML קוד:
<script type="text/javascript">
current = 0;
function example(toCurrent) {
current = toCurrent;
}

function readExample() {
alert(current);
}  


example(67);

readExample();
</script>
הטעות בקוד שלך היא שברגע שכתבת את current בתור פרמטר, אז הוא כבר לא גלובאלי כברירת מחדל.
  Reply With Quote