• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

467

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

Community Expert , 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

Votes

Translate

Translate
Community Expert ,
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

Votes

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