jquery get img src
$('img').attr(src);$('.img1 img').attr('src');readTextFile("file:///C:/your/path/to/file.txt");
function readTextFile(file)
{
var rawFile = new XMLHttpRequest();
rawFile.open("GET", file, false);
rawFile.onreadystatechange = function ()
{
if(rawFile.readyState === 4)
{
if(rawFile.status === 200 || rawFile.status == 0)
{
var allText = rawFile.responseText;
alert(allText);
}
}
}
rawFile.send(null);
}
Also in JavaScript:
- jquery watch checkbox change
- js map function
- check how many of a word is in a string
- regex only uppercase letters js
- node js async delay
- dart code formatter vscode
- space youtube
- Javascript clear canvas
- express file upload mv
- how do i check if JQuery checkbox is checked
- how to animate a flash in jquery
- node js store values in file
- javascript delete key from object
- variables in js class
- findindex js
- javascript add to object
- javascript loop an array check if a number is even
- ejs if else
- javascript convert seconds to minutes seconds
- Module not found: Error: Can't resolve 'core-js/client/shim'
- locak storage for table\ js
- remove header from certain pages react navigation
- typecasting javascript
- javascript map foreach