नीचे दिए गए विकल्पों मैं अपने एचटीएमएल कोड में होती है सबसे पहला।चेक अगर लटकती के चयनित विकल्प जावास्क्रिप्ट
if (document.getElementsByTagName('option') == "nothing"){
document.getElementById("subn").innerHTML = "Subject is Required!";
document.getElementById("subs").focus();
return false;
}
आपने 'document.getElementsByTagName ('subs') लिखा है, जहां आपका मतलब है 'document.getElementById (' subs ')' – RoToRa
@RoToRa - ओओएस कॉपी त्रुटि, धन्यवाद! और तय –
धन्यवाद, – Mahmoud