Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. function checkValue(name, value)
  2. {
  3. $("[name=" + name + "]").each(function () {
  4. console.log(value);
  5. });
  6. }
  7.  
  8. function checkValue(name, value)
  9. {
  10. if ($("[name*=" + name + "]").val() == value) {
  11. console.log(value);
  12. }
  13. }
  14.  
  15. jquery.min.js:2 Uncaught Error: Syntax error, unrecognized expression: [name=[object HTMLInputElement]]
  16. at Function.oe.error (jquery.min.js:2)
  17. at oe.tokenize (jquery.min.js:2)
  18. at oe.select (jquery.min.js:2)
  19. at Function.oe [as find] (jquery.min.js:2)
  20. at w.fn.init.find (jquery.min.js:2)
  21. at new w.fn.init (jquery.min.js:2)
  22. at w (jquery.min.js:2)
  23. at checkValue (index.js:10)
  24. at include_moduleingabe_function.php:280
  25.  
  26. function checkValue(name, value)
  27. {
  28. if ($("[name='" + name + "']").val() == value) {
  29. console.log(value);
  30. }
  31. }
  32.  
  33. $('[id^=name]').each(function() {
  34. console.log(value);
  35. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement