With an OR
(||) operation, if any one of the conditions are true, the result is true.
I think you want an AND
(&&) operation here.
More Related Contents:
- How I can push that button in browser console?
- Need decryption script [closed]
- How do you access the matched groups in a JavaScript regular expression?
- How to export JavaScript array info to csv (on client side)?
- Is it possible to write data to file using only JavaScript?
- How do you tell if caps lock is on using JavaScript?
- Difference between single quotes and double quotes in Javascript [duplicate]
- ExecJS::RuntimeError on Windows trying to follow rubytutorial
- Retrieving the text of the selected in element
- Will setInterval drift?
- Normalizing mousewheel speed across browsers
- ‘this’ does not work properly in another event. I’m clueless as to why [duplicate]
- How to make Internet Explorer emulate pointer-events:none?
- How to upload preview image before upload through JavaScript
- JavaScript – get array element fulfilling a condition
- SCRIPT438: Object doesn’t support property or method IE
- Integrating Dropzone.js into existing HTML form with other fields
- Generic way to detect if html form is edited
- Passing arguments to angularjs filters
- How to dynamically set a function/object name in Javascript as it is displayed in Chrome
- Click events on Pie Charts in Chart.js
- Uncaught SyntaxError: Unexpected token u in JSON at position 0
- Github – unexpected disconnect while reading sideband packet
- JavaScript in or just before ?
- JSLint “insecure ^” in regular expression
- Javascript maximum size for types?
- Mulitple Elements with the same ID
- Invalid shorthand property initializer [closed]
- Using jQuery inArray with array of JavaScript Objects
- React Router BrowserRouter leads to “404 Not Found – nginx ” error when going to subpage directly without through a home-page click