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

Document.getElementById() ??

Engaged ,
May 14, 2021 May 14, 2021

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

617
Translate
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

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

Translate
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