Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
190
rated 0 times [  194] [ 4]  / answers: 1 / hits: 35000  / 11 Years ago, fri, october 18, 2013, 12:00:00

I have implemented this function (libphonenumber javascript )in a website
http://www.phoneformat.com/



How do i get the value returned by this html tag. Whether Yes or No



< DIV id=phone_valid class=popup-value></DIV>' 


I have tried this



function checkSubmit(){
var country=$(#phone_valid).val();
if(country==No)
{
alert(Not a valid number);
return false;
}


So far no luck


More From » jquery

 Answers
26

The .val() method is primarily used to get the values of form elements such as input, select and textarea.



Use



$(#phone_valid).text();


to get DIV text content or



$(#phone_valid).html();


if you want markup.


[#74896] Thursday, October 17, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
aden

Total Points: 369
Total Questions: 100
Total Answers: 83

Location: Australia
Member since Tue, Oct 19, 2021
3 Years ago
;