i use such code to access item
function f(id){
$(\"#\"+id).val(); // with analogy $(\"#id item\")
}
is it correct? is any other methods?<
From the jQuery API website:
.val() Returns: String, Array
Description: Get the current value of the first element in the set of matched elements.
What It's not clear to me when you say
// with analogy $("#id item")
is if you want to have ONLY one child item of the one that is identifiedby #id or if you need the item that is identified by item#id.
Your code is perfect if you are passing a string like "hello" inside your code and you want to get the DOM element with ID of #hello.