Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

171
Views
Agregar imagen de matriz a HTML

Estoy tratando de hacer botones para agregar imágenes a HTML desde una matriz. ¿Por qué el primer fragmento no funciona?

El primer fragmento con matriz no funciona

 const fs = require('fs'); const dir = fs.readdirSync('/Files/Изображение').filter(files => files.endsWith('.png')) let imag = dir[0]; function createImgBlock() { const imgBlocks = document.createElement('img'); imgBlocks.src = '/Files/Изображение/' + dir[0]; document.body.append(imgBlocks); }

El segundo fragmento solo con el nombre de la imagen es trabajo

 const fs = require('fs'); const dir = fs.readdirSync('/Files/Изображение').filter(files => files.endsWith('.png')) let imag = dir[0]; function createImgBlock() { const imgBlocks = document.createElement('img'); imgBlocks.src = '/Files/Изображение/' + '1407916_900_600.png'; document.body.append(imgBlocks); }

about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!