हटा रहा है मैं पेजिनेशन के लिए कोड लिखने की कोशिश कर रहा हूं। एक फ़ंक्शन वर्तमान लिंक को अक्षम करना है, इसलिए यह टेक्स्ट की तरह दिखता है और अनजान हो सकता है। HTML पृष्ठ में इस तरह href विशेषता को छोड़ते हुए द्वारा प्राप्त किया जा सकता है:href विशेषता
<a>Link</a>
मैं ऐसा नहीं कर सकता है जावास्क्रिप्ट में
AvdonPagination.prototype.manageLinks = function(link){
if(link){
this.current.href = '#';
this.current = link;
}else{
this.current = this.links[0];
}
this.current.href = null;
}
क्योंकि
this.current.href = null;
पैदा करता
<a href="null">Link</a>
इसके अलावा मैंनेकी कोशिश की, और this.current.disabled=true
, लेकिन उनमें से कोई भी काम नहीं करता है। मैं <a>Link</a>
कैसे प्राप्त कर सकता हूं?
आप http://stackoverflow.com/questions/2533406/how-to-disable-a-html-tag देखा है –
आप removeAttribute की कोशिश की है? https://developer.mozilla.org/en-US/docs/Web/API/element.removeAttribute – zdyn
किसी तत्व से किसी विशेषता को निकालने के लिए निकालें एट्रिब्यूट – Musa