How does js prompt Uncaught TypeError to solve it?

error prompt:
Uncaught TypeError: autopbn.getAttribute is not a function at exauto_ajax_page.js?s1m:10

var autopbn = $("autopbn");
var nextpageurl = autopbn.getAttribute("rel").valueOf();//Uncaught TypeError: autopbn.getAttribute is not a function at exauto_ajax_page.js?s1m:10

getAttribute is a native method, and autopdn is a jquery object, so you cannot call a native method. Use attr ("rel")


it's very clear upstairs.
autopbn is a jQuery object, so naturally you can only use the jQuery method. In this article, it is .attr ('rel')
getAttribute is the operation method of DOM object. If you must use it, you can do the following

var $autopbn = $('autopbn');
var nextpageurl = $autopbn[0].getAttribute('rel').valueOf();

add $ to the variable, indicating that this is a jQuery object, which is different from the DOM object

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-7b2baa-160ab.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-7b2baa-160ab.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?