Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "use strict";
- async function getHtmlFromFile(f) {
- var fbody;
- fbody = await fetch(f).then(function(response) {
- return response.text();
- }).then(function(body) {
- return body;
- }).catch(function(error) {
- console.error(error);
- });
- return fbody;
- }
- $(document).ready(async () => {
- var f = './content.html';
- var r = await getHtmlFromFile(f);////*/
- alert(r);
- //$('#con').html(r);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement