मैं का उपयोग कर एक gridview में चेक बॉक्स के लिए कुछ jQuery संलग्न करने की कोशिश कर हूँ, document.ready:
$(document).ready(function()
{
var chkBox= document.getElementById(gvTimeSheet_ctl01_chkAll1);
//I can alert chkBox.id, element exists
var name = $(input[name='gvTimeSheet$ctl01$chkAll1']);
//Here, when I alert the id, I get a null
var ID = $(#gvTimeSheet_ctl01_chkAll1);
//Here, when I alert the id, I get a null
var withClass = $(.chkAll1Class);
//Here, when I alert the id, I get a null
var withClass2 = $(.Bill1);
//Here, when I alert the id, I get a null
//This line causes the browswer to crash and gives me the following error
//Microsoft JScript runtime error: 'null' is null or not an object
$(#gvTimeSheet_ctl01_chkAll1).click(function()
{
var checked_status = this.checked;
$(input[class=Bill1]).each(function()
{
this.checked = checked_status;
});
});
});*/
तो, क्यों jQuery में एक वस्तु अशक्त ढूँढने में किसी भी प्रयास को एक ही विधि के भीतर नियमित जावास्क्रिप्ट में मौजूद हैं, फिर भी? मुझे यहां क्या समझ नहीं आ रहा है। मैं jQuery js फ़ाइलों को सीधे इस विधि के ऊपर एक स्क्रिप्ट टैग में में लाया है। मैं बस jQuery के साथ इस पृष्ठ पर किसी भी वस्तुओं को खोजने के लिए प्रतीत नहीं कर सकते हैं। अन्य पृष्ठों पर, मैं कर सकते हैं।













