File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html >
3+
4+ < head >
5+ < script src ="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js "> </ script >
6+ < script >
7+ $ ( document ) . ready ( function ( ) {
8+ $ ( "#txtbtn" ) . click ( function ( ) {
9+ alert ( "Text: " + $ ( "#test" ) . text ( ) ) ;
10+ } ) ;
11+ $ ( "#htmlbtn" ) . click ( function ( ) {
12+ alert ( "HTML: " + $ ( "#test" ) . html ( ) ) ;
13+ } ) ;
14+ $ ( "#hrefbtn" ) . click ( function ( ) {
15+ alert ( $ ( "#googlelink" ) . attr ( "href" ) ) ;
16+ } ) ;
17+ } ) ;
18+ </ script >
19+ </ head >
20+
21+ < body >
22+
23+ < p id ="test "> This is some < b > bold</ b > text in a paragraph.</ p >
24+
25+ < p > < a href ="https://www.google.com/ " id ="googlelink " target ="blank "> Google.com</ a > </ p >
26+
27+ < button id ="txtbtn "> Show Text</ button >
28+ < button id ="htmlbtn "> Show HTML</ button >
29+ < button id ="hrefbtn "> Show href Value</ button >
30+
31+ </ body >
32+
33+ </ html >
You can’t perform that action at this time.
0 commit comments