Pomocí událoati onLoad spusťte při otevření stránky jazyk.html dotazovací okénko s možností výběru jazyka (en,cz,fr,de) a podle odpovědi zobrazte správnou jazykovou verzi. Jako text použijte báseň od Williama Blake Tygr viz. níže ve daných jazykových verzích.
Potřebné "nástroje"
onLoad
window.prompt
function
document.getElemenById
.innerHTML
CSS
<div>
border-style:solid
border-color:red
bordr-width:1px
width:400px
en="<pre>\nTyger\n(William Blake)\n\nTyger, Tyger burning bright,\nIn the forest on the night:\nWhat immortal hand of eye.\nCould frame thy fearful symmetry?\n\nIn what distant deep or skies\nBurnt the fire of thine eyes?\nOn what wings dare he aspire?\nWhat the hand dare seize the fire?\n\nAnd what shoulder, what art\nCould twist the sinews on thy heart?\nAnd when thy heart began to beat,\nWhat dread hand? what dread feet?\n\nWhat the hammer? what the chain.\nIn what furnace was thy brain?\nWhat the anvil? what dread grasp\nDare is deadly terrors clasp?\n\nWhen the stars threw down their spears\nAnd wate´d heaven with their tears,\nDid he smile his work to see?\nDid he who made the Lamb make thee?\n\nTyger, Tyger, burning bright\nIn the forest of the night:\nWhat immortal hand or eye\nDare frame thy fearful symmetry?\n</pre>";
fr="<pre>\nTigre O Tigre\n(William Blake)\n\nTigre O Tigre! Toi qui luis\nAu fond des forêts de la nuit,\nQuel esprit immortel sut faire\nTa symétrie meurtrière?\n\nSur quels gouffres et sous quels cieux\nBrûla-t-il le feu de tes yeux?\nQuelle aile prît un tel essor?\nQuel bras saisit ce feu, cet or?\n\nQuelle force de quel sculpteur\nTordit les tendons de ton cœur?\nEt quand ce cœur se mut en toi\nQuels pieds, quels bras, et quel effroi!\n\nA qui la chaîne, le marteau,\nLa forge où flamba ton cerveau,\nL'enclume? Quelle poigne cruelle\nCrut serrer ses terreurs mortelles?\n\nTout astre a déposé ses armes,\nEt trempé le ciel de ses larmes.\nSourit-il? Te fit-il Celui\nQui fit l'agneau au temps jadis?\n\nTigre O Tigre! Toi qui luis\nAu fond des forêts de la nuit,\nQuel immortel oserait faire\nTa symétrie meurtrière?\n</pre>";
de="<pre>\nDer Tiger\n(William Blake)\n\nTiger, Tiger, Feuerspracht\nin der Dschungeln dunkler Nacht:\nWelches Aug', welch' ew'ge Hand\nformten Deiner Schrecken Brand?\n\nIn welch' Himmeln ungeheuer\nbrannte Deiner Augen Feuer?\nWessen Flügel, wessen Hand\nwagte sich an diesen Brand?\n\nWelcher Schulter Können wand\nDeines Herzens Sehnenstrang?\nWer, als Herzens Schlag begann,\nfurchtbar Hand und Fuß ersann?\n\nWelche Kett' und Hammer fand\nin welch' Esse den Verstand?\nWelcher Amboß, welche Welt\nDeine Todesschrecken hält?\n\nAls der Sterne Speer herab\nTränen unserm Himmel gab:\nHat vollbracht er's und bedacht,\ndaß er Lamm und Dich gemacht?\n\nTiger, Tiger, Feuerspracht\nin der Dschungeln dunkler Nacht:\nWelches Auge, welche Hand\nwagten Deines Schreckens Brand?\n</pre>";
cz="<pre>\nTygr\n(William Blake)\n\nTygře tygře ohnivou\nzáříš svítíš lesní tmou\nkdo ten nesmrtelník byl\njenž z ní ti souměr setrojil\n\nV kterých hlubinách či nebesích\nhořel oheň v očích tvých\nkdo opovážil vlet se dál\nrukou tam ten oheň brát\n\nKdo v tvém srdci k svalu sval\numěním a silou spjal\nčí hrozná ruka mohla vzít\nsrdce když chce jalo bít\n\nKým byl mozek ukován\nv kterou pec byl potom dán\njeho hrůzy strašlivé\nkdo je sevřel v pěsti své\n\nA kdy hvězdy vrhaly střely\nspokojen byl s dílem svým\nje snad tvůrce beránků\ni stvořitelem tvým\n\nTygře tygře ohnivou\nzáříš svítíš lesní tmou\nkdo ten nesmrtelník byl\njenž z ní ti souměr setrojil\n</pre>";
Tygr