Skip to content

Commit b55047f

Browse files
authored
Create Load Text from Files into Elements.html
1 parent bd08cd2 commit b55047f

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<!doctype html>
2+
<!-- Almost all websites nowadays use "html 5" doctype declaration, which is, "doctype html" -->
3+
<!-- Doctype declaration is important, for example, jQuery requires it in order to work properly -->
4+
<!-- Doctype declaration must be the very first thing in your HTML document, before the "html" tag -->
5+
6+
<object data="http://www.pcre.org/pcre.txt" style="color:red; background-color:grey;width:425px; height:150px;"></object>
7+
<object data="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js" style="color:red; background-color:grey;width:425px; height:150px;"></object>
8+
<br>
9+
<textarea id="TextArea_1" readonly cols="50" rows="10" wrap="off"> </textarea>
10+
<textarea id="TextArea_2" readonly cols="50" rows="10" wrap="off"> </textarea>
11+
<br>
12+
<textarea id="TextArea_3" readonly cols="50" rows="10" wrap="off"> </textarea>
13+
<textarea id="TextArea_4" readonly cols="50" rows="10" wrap="off"> </textarea>
14+
15+
<!-- __________________________________________________________________________________________ -->
16+
17+
18+
<!-- Load jQuery hosted by Google into your website -->
19+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
20+
21+
22+
<script>
23+
24+
/*** ______ Using jQuery .get() - Easier to use ______ ***/
25+
26+
$.get('https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js', function(data) {
27+
$('#TextArea_1').val(data);
28+
});
29+
30+
$.get('https://raw.githubusercontent.com/coder4589/elevatezoom-plus-coder4589/master/Blogger%20-%20elevateZoom.txt', function(data) {
31+
$('#TextArea_2').val(data);
32+
});
33+
34+
/*** ______ Using jQuery .ajax() ______ ***/
35+
36+
$.ajax({url: "https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js", success: function(result){
37+
$("#TextArea_3").val(result);
38+
}});
39+
40+
$.ajax({url: "https://raw.githubusercontent.com/coder4589/elevatezoom-plus-coder4589/master/Blogger%20-%20elevateZoom.txt", success: function(result){
41+
$("#TextArea_4").val(result);
42+
}});
43+
44+
</script>

0 commit comments

Comments
 (0)