Direct DOM manipulation or access
up vote
0
down vote
favorite
Look at this code:
<div>
<p onClick="parentNode.remove()">click me</p>
</div>
Is it accessing dom via js.
I saw similar example example somewhere and it worked.
- How is it possible without js or is it somehow javascript
- Will it work if js is disabled in browser.
- Where can I look for similar functions. mozilla's dom api docs were not very helpful for me as I could not even find that parentNode.remove() function.
javascript html dom
New contributor
add a comment |
up vote
0
down vote
favorite
Look at this code:
<div>
<p onClick="parentNode.remove()">click me</p>
</div>
Is it accessing dom via js.
I saw similar example example somewhere and it worked.
- How is it possible without js or is it somehow javascript
- Will it work if js is disabled in browser.
- Where can I look for similar functions. mozilla's dom api docs were not very helpful for me as I could not even find that parentNode.remove() function.
javascript html dom
New contributor
2
Possible duplicate of How does inline Javascript (in HTML) work?
– Brian H.
Nov 19 at 11:37
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Look at this code:
<div>
<p onClick="parentNode.remove()">click me</p>
</div>
Is it accessing dom via js.
I saw similar example example somewhere and it worked.
- How is it possible without js or is it somehow javascript
- Will it work if js is disabled in browser.
- Where can I look for similar functions. mozilla's dom api docs were not very helpful for me as I could not even find that parentNode.remove() function.
javascript html dom
New contributor
Look at this code:
<div>
<p onClick="parentNode.remove()">click me</p>
</div>
Is it accessing dom via js.
I saw similar example example somewhere and it worked.
- How is it possible without js or is it somehow javascript
- Will it work if js is disabled in browser.
- Where can I look for similar functions. mozilla's dom api docs were not very helpful for me as I could not even find that parentNode.remove() function.
javascript html dom
javascript html dom
New contributor
New contributor
New contributor
asked Nov 19 at 11:20
topenion
32
32
New contributor
New contributor
2
Possible duplicate of How does inline Javascript (in HTML) work?
– Brian H.
Nov 19 at 11:37
add a comment |
2
Possible duplicate of How does inline Javascript (in HTML) work?
– Brian H.
Nov 19 at 11:37
2
2
Possible duplicate of How does inline Javascript (in HTML) work?
– Brian H.
Nov 19 at 11:37
Possible duplicate of How does inline Javascript (in HTML) work?
– Brian H.
Nov 19 at 11:37
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
- It is "somehow" javascript.
- No. It's legit js so it will not work.
ParentNode
remove
You can look at this question
for clarification How does inline Javascript (in HTML) work?
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
- It is "somehow" javascript.
- No. It's legit js so it will not work.
ParentNode
remove
You can look at this question
for clarification How does inline Javascript (in HTML) work?
add a comment |
up vote
0
down vote
accepted
- It is "somehow" javascript.
- No. It's legit js so it will not work.
ParentNode
remove
You can look at this question
for clarification How does inline Javascript (in HTML) work?
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
- It is "somehow" javascript.
- No. It's legit js so it will not work.
ParentNode
remove
You can look at this question
for clarification How does inline Javascript (in HTML) work?
- It is "somehow" javascript.
- No. It's legit js so it will not work.
ParentNode
remove
You can look at this question
for clarification How does inline Javascript (in HTML) work?
answered Nov 19 at 11:41
Smollet777
772415
772415
add a comment |
add a comment |
topenion is a new contributor. Be nice, and check out our Code of Conduct.
topenion is a new contributor. Be nice, and check out our Code of Conduct.
topenion is a new contributor. Be nice, and check out our Code of Conduct.
topenion is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53373539%2fdirect-dom-manipulation-or-access%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
Possible duplicate of How does inline Javascript (in HTML) work?
– Brian H.
Nov 19 at 11:37