Code:
< input id= "number0" name= "number" type= "text" value= "1" class= "number_text" >
< href= "- sharp" onclick= "addNum (this)" id= "add0" class= "jia" > + < / >
function addNum (a) {
alert(a.prev("input").text());
}
because the a tag will be converted on the web page, I remove the a
question: I want to get the value of input, but this doesn"t work. What value should be passed in, addNum () parentheses, and how to get the upper-level element