Prikazi cijelu temu 19.12.2025 15:44
Avko Van mreze
Administrator
Registrovan od:28.05.2014
Lokacija:zagreb


Predmet:Re:kako prikazati ascii znakove u alert-u
nece ovo:
PreuzmiIzvorni kôd (Text):
  1. echo '<script>
  2.             const layers = [
  3.                
  4.             ];
  5.      
  6.             function drawTree(layers) {
  7.                 let tree = "";
  8.                 const width = layers[layers.length-1].length + (layers.length*2);
  9.                 layers.forEach(row => {
  10.                     let line = row.join("");
  11.                     let padding = " ".repeat(Math.floor((width - line.length)/2));
  12.                     tree += padding + line + "\n";
  13.                 });
  14.                 return tree;
  15.             }
  16.      
  17.             alert(drawTree(layers));
  18.         </script>';

ne mogu prikazat znakove ni ovdje ni kod sebe

Prilozi:
icentar.png
Preuzimanja:6
Velicina datoteke:77.48 KB


zivot je moja domovina.
Ovaj post je ureden 1 puta. Posljednja izmjena 19.12.2025 15:46 od strane Avko.