यह कोड क्यों काम नहीं करता है? मैं एफएफ का उपयोग कर रहा हूँ।getElementById और शून्य - क्यों?
<head>
<script type="text/javascript">
document.getElementById("someID").onclick = function(){
alert("Yahooo");
}
</script>
</head>
<body>
<a href="#" id="someID">someID</a>
</body>
</html>
मुझे जावास्क्रिप्ट त्रुटि मिल रही है IlementById शून्य के बराबर है।
ओएमजी! Facepalm। धन्यवाद :) – lunar