HighDamage Posted June 14, 2015 Share Posted June 14, 2015 Aşağıdaki yazdığım javascript kodu çalışmıyor.Kafayı yemek üzereyim.Lütfen biri hatamı söyleyebilir mi. <html><head></head><body><script type='text/javascript'> var ad='anıl' ; var soyad='kuşçu' ; if (ad=='anıl'){document.write('adın doğru');} {if (soyad=='kuşçu'){document.write('soyadın da doğru');} else {document.write('soyad yanlış');} } else {document.write('ad yanlış');} </body> </html> Quote Link to comment Share on other sites More sharing options...
Bultar Posted June 14, 2015 Share Posted June 14, 2015 Javayı bilmiyorum ama sözdizimi hatası yapmış gibisin. C bilen biri olarak şöylesi daha mantıklı geldi bana. var ad='anıl' ; var soyad='kuşçu' ; if (ad=='anıl') {document.write('adın doğru');} else {document.write('ad yanlış');} if (soyad=='kuşçu') {document.write('soyadın da doğru');} else {document.write('soyad yanlış');} } Quote Link to comment Share on other sites More sharing options...
HighDamage Posted June 14, 2015 Author Share Posted June 14, 2015 Evet oluyor.Ama şöyle şimdi benim amacım burada iç içe fonksiyon kullanmaktı başaramadım :D Quote Link to comment Share on other sites More sharing options...
Bultar Posted June 15, 2015 Share Posted June 15, 2015 o zaman if ten sonraki { } parantezleri arasına yazacaksın. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.