How i can getelementbyid from div ?

Get help using Construct 2

Post » Thu Mar 09, 2017 8:14 am

How i can getelementbyid from div ?
my html:

<body>

<div id="name">my player name
</div>

<div id="c2canvasdiv">
<canvas id="c2canvas" width="1000" height="500">
</canvas>
</div>
</body>

now i must use CAllJS or something to get player name frome div ID. What i must write in execute?
i add to construct JS this:
"var "&name_player&" = document.getElementById('name');"

next
i set text --> name_player

but this dosent work;/


how i can put player name frome website to construct?
B
10
S
4
G
1
Posts: 29
Reputation: 898

Post » Fri Mar 10, 2017 10:17 pm

someon can helped?
B
10
S
4
G
1
Posts: 29
Reputation: 898


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 9 guests