Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jquery load

$( "#result" ).load( "ajax/test.html" );
Comment

jQuery load() method

Syntex
$(selector).load(URL, data, callback);

Example:
$('#loadhere').load('file.html'); 
<div id="loadhere"></div>
Comment

Jquery load

// this page loads the file "data.txt" when the button is clicked.
// This file is index.php.
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet"/>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
  <script>
    $(document).ready(function(){
      $("#btn").click(function() {
        $("#content").load("data.txt");
      });
    })
  </script>
</head>

<body>
  <div id="content"></div>
  <br>
  <button id="btn">Press Me</button>
</body>
</html>
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript replace all string 
Javascript :: type in javascript 
Javascript :: js catch rejected promise 
Javascript :: password meter 
Javascript :: vue loop 
Javascript :: javascript The toString() Method 
Javascript :: angular read config from json 
Javascript :: find unique value on array 
Javascript :: javascript array findindex 
Javascript :: expo app loading 
Javascript :: pass variable to partial view ejs 
Javascript :: bracket notation javascript 
Javascript :: how to find smallest number in array js 
Javascript :: javascript fill circle with color 
Javascript :: js months ago 
Javascript :: how to stop type text texbox in javascript 
Javascript :: js get fibonacci number 
Javascript :: each jquery 
Javascript :: javascript timestamp to date 
Javascript :: javascript for loop array backwards 
Javascript :: react select disable option 
Javascript :: image view component react js 
Javascript :: how to check if the element exist in the parent element javascript 
Javascript :: how to comments in json file 
Javascript :: ajax data not reflecting after refresh particular div jquery 
Javascript :: THE REDUCE() METHOD IN JAVASCRIPT 
Javascript :: gitignore subfolders 
Javascript :: express referrer 
Javascript :: trigger a function inside child from parent vue 
Javascript :: javascript remove string between 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =