Home>
I want to do string matching in the page of the specified URL.
The way to image is to store the entire page of the specified URL in the string str,
I imagine it as str.match ("hoge"), but how do I get the entire page string
Can be stored in str?
-
Answer # 1
-
Answer # 2
var str = document.body.innerText;
How about it? textContent is fine.
Related articles
- javascript - i want to redraw (render) when a query string is given in react router
- javascript - when i try to insert an array string as a class, it becomes undefined
- javascript - i want a function that returns a string to work in return
- javascript - i want to get the information of the specified query parameter in restapi acquisition using axios
- javascript - how to get the src of the clicked img and display the src of the obtained img in the specified location (when there
- read a python text file and get n lines from the line starting with the specified string
- how to extract a specified string using a vba macro
- text and link colors cannot be specified in javascript
- swift - i want to convert an int to a string with a specified number of digits padded with spaces
- javascript - when you mouse over the scroll bar, the mouse cursor specified in the image returns to the normal cursor
- javascript - how to get a string from a table, concatenate it with another string and display it on the screen
- [javascript] i want to copy the character string embedded in html to the clipboard
- javascript - i want to repeat extraction for a character string and convert it to a regular expression
- javascript - delete the data in the specified row
- javascript - is it possible to get even if name is entered in the id name specified by getelementbyid?
- javascript - i want to get all specified column values from the model defined by sequelize
- i want to not execute the function if the same string is used in javascript and php
- javascript - i want to change a string such as 1,000 to 1000
- javascript - i want to replace a string of a particular format with another string in a regular expression
- questions about javascript string manipulation
Trends
When executing JavaScript in Node.js, there are modules such as
http
andrequest
. Please use them.In the case of a web page in a browser, sites in other domains have CORS, so basicallycannot get.