/    Sign up×
Community /Pin to ProfileBookmark

Could someone throw some light on

[B]document.forms[0].target[/B]

[CODE]window.open(”,’rapper’,’toolbar=no,location=no,status=yes,menubar=no,scrollbars=yes,resizable=yes’,true);
document.forms[0].target = “rapper”;
document.forms[0].submit();[/CODE]

what is [B]document.forms[0].target = “rapper”;[/B] doing exactly….
It could be appreciable if they give me an example….

Thanks guys

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@konithomimoMar 27.2006 — document --> the document of course

forms[0] --> the first form on the page

target --> an attribute of the form whose value tells which object to affect once the form is submitted

rapper --> the name(value) of the target

basically it means set the target of the form to be rapper.

That means that when the form is submitted that the object with the name/ID of rapper will be affected.
×

Success!

Help @java_sud spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...