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 :: hex string to decimal string javascript 
Javascript :: closures in javascript 
Javascript :: express octet stream 
Javascript :: Javascript screenshot in video 
Javascript :: javascript insert div into another div 
Javascript :: how to swap two elements in an array javascript 
Javascript :: comment in javascript 
Javascript :: http module in nodejs 
Javascript :: how to check if array 
Javascript :: angular material button align left 
Javascript :: pm2 logs on same console 
Javascript :: useeffect cleanup in reactjs 
Javascript :: check-if-a-javascript-string-is-a-url 
Javascript :: promise with timeout js 
Javascript :: Function Alert,confirm,prompt 
Javascript :: Define the constructor property on the Dog prototype. 
Javascript :: spring react 
Javascript :: how to auto update package.json 
Javascript :: volume slider javascript 
Javascript :: how to create a new angular project in visual studio code 
Javascript :: prependchild javascript 
Javascript :: js store regex in variable and combine 
Javascript :: reverse js 
Javascript :: javascript check if visible 
Javascript :: Navigator operation requested with a context that does not include a Navigator. 
Javascript :: discord.js presence update 
Javascript :: react load script after render 
Javascript :: how to cancel request using axios cancel token 
Javascript :: C# Convert DataTable to Json File using Newtonsoft.Json DLL 
Javascript :: fs fstat 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =