Document.getElementById() ??

Engaged ,
May 14, 2021 May 14, 2021

Copy link to clipboard

Copied

HTML5 canvas

I have a movie clip

 

var img = container.document.getElementById("img").getElementsByClassName("text_input_css");
container.style.width = newWidth;
container.style.height = newHeight;

 

 

2021-05-14_18-54-18.jpg

 

2021-05-14_18-53-02.jpg

Views

97

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Community Professional , May 14, 2021 May 14, 2021
use document.getElementById("img"); if you have an element with id = img the css is irrelevant. and use document.getElementsByClassName("text_input_css); if you have elements from that class in your html

Likes

Translate

Translate
Adobe Community Professional ,
May 14, 2021 May 14, 2021

Copy link to clipboard

Copied

LATEST

use

 

document.getElementById("img");

 

if you have an element with id = img

 

the css is irrelevant.

 

and use

 

document.getElementsByClassName("text_input_css);

 

if you have elements from that class in your html

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines