Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Неправильно работает val() с select, в котором option с пустым value #31

Open
shastox opened this issue Jan 28, 2020 · 1 comment

Comments

@shastox
Copy link

shastox commented Jan 28, 2020

Select с options с пустым value (если value не пустое, то все ок):

<select>
   <option value="">123</option>
</select>

Dom7: $('select').val() == '123' //Берет значение не с value
Для сравнения, JQuery: $('select').val() == '' //Пустая строка

@shastox
Copy link
Author

shastox commented Jan 28, 2020

Вот тут на стеке эта тема: https://stackoverflow.com/questions/5598859/how-to-retrieve-empty-option-value-if-its-empty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant