GENERATOR STRANOK

ID
Nazov / Name:
Popis / Description:
Dlzka / Length:
Testovane pod / Tested under:

 

027
p027.html / p027.zip
Na zaklade udanych udajov vygeneruje Zdrojovy tvar / Source code stranky
5575b
NN 4.04

UKAZKA / CLICK HERE

Zdrojovy tvar / Source code:

<HTML> <HEAD> <TITLE> JavaScript DESTINATION - P027 </TITLE> <script language = "JavaScript"> <!-- function View(form){ msg=open("","DisplayWindow","status=1,scrollbars=1");msg.document.write(form.Text2.value); } function Generate(form){ var txt="<html><HEAD><TITLE>"+form.Name.value+"</TITLE></HEAD>\r\n";txt+="<CENTER><h1><font color=red>"+form.Name.value+"</font></h1></CENTER><hr>\r\n"; txt+="<body><font size=4>\r\n"; if(form.Text1.value) txt+=form.Text1.value+"\r\n"; if(form.Fav1URL.value||form.Fav2URL.value||form.Fav3URL.value||form.Fav4URL.value||form.Fav5URL.value||form.Fav6URL.value){ txt+="<hr><font>Moje oblubene stranky:<br><ul>\r\n<li><a href=http://www.pavucina.sk>Casopis Pavucina</a><br>\r\n"; if(form.Fav1URL.value) txt+="<li><a href="+form.Fav1URL.value+">"+form.Fav1Title.value+"</a><br>\r\n"; if(form.Fav2URL.value) txt+="<li><a href="+form.Fav2URL.value+">"+form.Fav2Title.value+"</a><br>\r\n"; if(form.Fav3URL.value) txt+="<li><a href="+form.Fav3URL.value+">"+form.Fav3Title.value+"</a><br>\r\n"; if(form.Fav4URL.value) txt+="<li><a href="+form.Fav4URL.value+">"+form.Fav4Title.value+"</a><br>\r\n"; if(form.Fav5URL.value) txt+="<li><a href="+form.Fav5URL.value+">"+form.Fav5Title.value+"</a><br>\r\n"; if(form.Fav6URL.value) txt+="<li><a href="+form.Fav6URL.value+">"+form.Fav6Title.value+"</a><br>\r\n"; txt+="</ul></font>"; } if(form.EMail.value){ txt+="<hr>Otazky? Komentare? Poslite mi E-Mail:\r\n"; txt+="<address><a href=mailto:"+form.EMail.value+">"+form.EMail.value+"</address>\r\n"; } txt+="</font></body></html>"; form.Text2.value=txt; } function AddText(form, Action){ var AddTxt=""; var txt=""; if(Action==1){ txt=prompt("Text pre odstavec velkosti 1.","Text"); if(txt!=null) AddTxt="<h1>"+txt+"</h1>\r\n"; } if(Action==2){ txt=prompt("Text pre odstavec velkosti 2.","Text"); if(txt!=null) AddTxt="<h2>"+txt+"</h2>\r\n"; } if(Action==3){ txt=prompt("Text pre odstavec velkosti 3.","Text"); if(txt!=null) AddTxt="<h3>"+txt+"</h3>\r\n"; } if(Action==4){ txt=prompt("Text, ktory ma byt zvyrazneny.","Text"); if(txt!=null) AddTxt="<b>"+txt+"</b>"; } if(Action==5){ txt=prompt("Text, ktory ma byt napisany kurzivou.","Text"); if(txt!=null) AddTxt="<i>"+txt+"</i>"; } if(Action==6) AddTxt="\r\n<p>"; if(Action==7) AddTxt="<br>\r\n"; if(Action==8) AddTxt="<hr>\r\n"; if(Action==9){ txt=prompt("URL odkazu.","http://"); if(txt!=null){ AddTxt="<a href="+txt+">"; txt=prompt("Text, ktory ma byt umiestneny na odkaze","Text"); AddTxt+=txt+"</a>\r\n"; } } if(Action==10){ txt=prompt("URL obrazku.","URL"); if(txt!=null) AddTxt="<img src="images/+txt+">\r\n"; } form.Text1.value+=AddTxt; } function ResetPage(form){ if(confirm("Vynulovat stranku?")){ form.Text1.value=""; form.Text2.value=""; form.Name.value=""; form.EMail.value=""; form.Fav1URL.value=""; form.Fav1Title.value=""; form.Fav2URL.value=""; form.Fav2Title.value=""; form.Fav3URL.value=""; form.Fav3Title.value=""; form.Fav4URL.value=""; form.Fav4Title.value=""; form.Fav5URL.value=""; form.Fav5Title.value=""; form.Fav6URL.value=""; form.Fav6Title.value=""; } } // --> </script> </HEAD> <body> <FORM ACTION=""> <center> <table border=2> <tr><td> Nazov stranky: <td> <input type="text" name="Name" size=30> <tr><td> Tvoja e-mail adresa (*): <td> <input type="text" name="EMail" size=30> <tr><td colspan=2>Tvoje oblubene stranky:(*) <tr><td> URL: <td> Nazov: <tr><td> <input type="text" name="Fav1URL" size=30> <td> <input type="text" name="Fav1Title" size=30> <tr><td> <input type="text" name="Fav2URL" size=30> <td> <input type="text" name="Fav2Title" size=30> <tr><td> <input type="text" name="Fav3URL" size=30> <td> <input type="text" name="Fav3Title" size=30> <tr><td> <input type="text" name="Fav4URL" size=30> <td> <input type="text" name="Fav4Title" size=30> <tr><td> <input type="text" name="Fav5URL" size=30> <td> <input type="text" name="Fav5Title" size=30> <tr><td> <input type="text" name="Fav6URL" size=30> <td> <input type="text" name="Fav6Title" size=30> <tr> <td colspan=2>Telo(*): <tr align=center> <td colspan=2> <input type="Button" value="Odstavec1" onClick="AddText(this.form,1);"> <input type="Button" value="Odstavec2" onClick="AddText(this.form,2);"> <input type="Button" value="Odstavec3" onClick="AddText(this.form,3);"> <input type="button" value="Zvyraznenie" onClick="AddText(this.form,4);"> <input type="button" value="Kurziva" onClick="AddText(this.form,5);"> <br> <input type="button" value="Odsek" onClick="AddText(this.form,6);"> <input type="button" value="Dalsi riadok" onClick="AddText(this.form,7);"> <input type="button" value="Ciara" onClick="AddText(this.form,8);"> <input type="button" value="Odkaz" onClick="AddText(this.form,9);"> <input type="button" value="Grafika" onClick="AddText(this.form,10);"> <br> <textarea name="Text1" Rows=8 Cols=60> </textarea> <tr align=center> <td colspan=2> <input type="button" value="Vygenerej zdrojak" onClick="Generate(this.form);"> </table> <hr> <input type="button" value="Vynuluj" onClick="ResetPage(this.form);"> <input type="button" value="Prezri" onClick="View(this.form);"> <br> <textarea name="Text2" rows=8 Cols=70> </textarea> </center> </FORM> </HEAD> </body> </HTML>
[ Navrat / BACK ]