use the indexOf function
if(divs[i].innerHTML.indexOf("word") !== -1) {
// something
}
Related Contents:
- Check if a div does NOT exist with javascript
- How do I check whether a checkbox is checked in jQuery?
- How can I know which radio button is selected via jQuery?
- offsetting an html anchor to adjust for fixed header [duplicate]
- Check if an element contains a class in JavaScript?
- Selecting all text in HTML text input when clicked
- Clearing using jQuery
- What is the difference between properties and attributes in HTML?
- What is the correct syntax of ng-include?
- Select all elements with a “data-xxx” attribute without using jQuery
- Disabled href tag [duplicate]
- How to make an HTML back link?
- HTML Entity Decode [duplicate]
- What is offsetHeight, clientHeight, scrollHeight?
- Communication between tabs or windows
- How to get the title of HTML page with JavaScript?
- How to embed an autoplaying YouTube video in an iframe?
- Ternary operator in AngularJS templates
- How do I get the information from a meta tag with JavaScript?
- Which browsers support ?
- How to validate inputs dynamically created using ng-repeat, ng-show (angular)
- Force page scroll position to top at page refresh in HTML
- Get list of data-* attributes using javascript / jQuery
- Get city name using geolocation [duplicate]
- Is it possible to hide the cursor in a webpage using CSS or Javascript?
- (HTML) Download a PDF file instead of opening them in browser when clicked
- ES2015 import doesn’t work (even at top-level) in Firefox
- Which is better: … or …
- How do I disable a href link in JavaScript?
- Export html table data to Excel using JavaScript / JQuery is not working properly in chrome browser
- File Upload without Form
- How to read the post request parameters using JavaScript
- HTML/Javascript: how to access JSON data loaded in a script tag with src set
- Is there a best practice for generating html with javascript
- Ignore mouse interaction on overlay image
- Does HTML5 allow drag-drop upload of folders or a folder tree?
- Wait cursor over entire html page
- How to use Javascript to read local text file and read line by line?
- ES6 modules in the browser: Uncaught SyntaxError: Unexpected token import
- Unexpected token < in first line of HTML
- Disable scrolling on “
- javascript get x and y coordinates on mouse click
- How to connect HTML Divs with Lines? [duplicate]
- Impossible to hide navigation bars in Safari iOS 7 for iPhone/iPod touch
- HTTP Authorization Header in EventSource (Server Sent Events)
- Add CSS to with JavaScript?
- How to debug web workers
- Text-overflow ellipsis on left side
- focus() to input without scrolling
- Executing JavaScript after X seconds