jquery - Javascript $ notation -
this question has answer here:
- can explain dollar sign in javascript? 7 answers
please can explain javascript code does.
$('#element_id').html(response.title);
i need access value of element_id can't using document.getelementbyid.
thanks
this code calls function named $
, access method of returned object.
it's jquery code due selector string.
$('#element_id')
: returns jquery object element given id..html(response.title)
: sets inner html of dom elementresponse.title
.
the raw javascript this:
document.getelementbyid("element_id").innerhtml = response.title;
Comments
Post a Comment