the selector in JavaScript
I want to get the object of this code ,
<input class="radio"
id="conversation_sub_kind_id_208"
name="conversation[sub_kind_id]"
onclick="set_department_name('department_name208')"
type="radio"
value="208" />
I want to use jQuery Framework to get the object, like the document.getElementbyTagName("con开发者_运维百科v...");
what should i do in here?
Thank you, and best regards!
$('#conversation_sub_kind_id_208');
more here
It should be as simple as $('#conversation_sub_kind_id_208')
. That would give you the jQuery object. If you want the underlying DOM element, do it like this: $('#conversation_sub_kind_id_208').get(0)
.
Or you could not use Jquery and simply do:
document.getElementById("conversation_sub_kind_id_208");
精彩评论