How do I get certain values of a HTML attribute in Javascript? -
How do I get certain values of a HTML attribute in Javascript? -
i take value of attribute, process , replace php variable value receive @ end.
the info attribute data-id
, need assistance getting value of data-id javascript on click event
, rest can do.
an example:
person clicks tag data-id set as, say, 7. i'd need extract 7 html code , javascript variable can work said value.
i hope clear enough
try this
$('#someelement').click(function(){ $(this).data('id'); });
javascript html
Comments
Post a Comment