FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
JavaScript/jQuery/jQuery-HTML/set.html at before-marster · lgope/JavaScript · GitHub
lgope
/
JavaScript
Public
Notifications
You must be signed in to change notification settings
Fork
4
Star
11
Code
Issues
0
Pull requests
2
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
JavaScript
/
jQuery
/
jQuery-HTML
/
set.html
Copy path
More file actions
More file actions
Latest commit
History
History
History
53 lines (39 loc) · 1.51 KB
Breadcrumbs
JavaScript
/
jQuery
/
jQuery-HTML
/
set.html
Copy path
File metadata and controls
53 lines (39 loc) · 1.51 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html
>
<
html
>
<
head
>
<
script
src
="
https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js
"
>
</
script
>
<
script
>
$
(
document
)
.
ready
(
function
(
)
{
$
(
"#btn1"
)
.
click
(
function
(
)
{
$
(
"#test1"
)
.
text
(
function
(
i
,
originalText
)
{
return
`Old text:
${
originalText
}
New text: Hello World! (index:
${
i
}
)`
;
}
)
;
}
)
;
$
(
"#btn2"
)
.
click
(
function
(
)
{
$
(
"#test2"
)
.
html
(
function
(
i
,
originalText
)
{
return
`Old html:
${
originalText
}
New html: Hello <b> World! </b> (index:
${
i
}
)`
}
)
;
}
)
;
$
(
"#btn3"
)
.
click
(
function
(
)
{
$
(
"#test3"
)
.
val
(
"Hello World!"
)
;
}
)
;
$
(
"#btn4"
)
.
click
(
function
(
)
{
$
(
"#hreftag"
)
.
attr
(
{
"href"
:
"https://github.com/"
}
)
;
$
(
"#linktag"
)
.
children
(
"a"
)
.
text
(
"github.com"
)
;
}
)
;
}
)
;
</
script
>
</
head
>
<
body
>
<
p
id
="
test1
"
>
This is a
<
b
>
bold
</
b
>
paragraph.
</
p
>
<
p
id
="
test2
"
>
This is another
<
b
>
bold
</
b
>
paragraph.
</
p
>
<
p
>
Input field:
<
input
type
="
text
"
id
="
test3
"
value
="
Mickey Mouse
"
>
</
p
>
<
p
id
="
linktag
"
>
<
a
id
="
hreftag
"
href
="
https://www.google.com/
"
target
="
blank
"
>
google.com
</
a
>
</
p
>
<
button
id
="
btn1
"
>
Show Old/New Text
</
button
>
<
button
id
="
btn2
"
>
Show Old/New HTML
</
button
>
<
button
id
="
btn3
"
>
Set Value
</
button
>
<
button
id
="
btn4
"
>
Change href and title
</
button
>
</
body
>
</
html
>
Back
|
FazBrowse Home
|
New Git URL