#!/COMMUNITY
Members: 5374
davon online: 1
weitere User: 26
12.02.2012 / 09:35
Community-Member werden
|
Paßwort vergessen
|
OnlineMonitor (1)
Perl-Archiv
Forum
Javascript
Home
PERLscripts
PHPscripts
JAVAscripts
Hilfreiches
Links2www
Newscenter
Community
Interna
Javascript
Archivübersicht
Tutorials
Zum Forum
JS-Links
BuchTipps
WebForen
Forenübersicht
Neueste Themen
Ohne Antwort
Aktivste Themen
Themensuche
Forenarchiv
Newsgroups
Javascript » Nützliches » Wasserzeichen Wizard
zur Übersicht
Kategorie
Nützliches
Bezeichnung
Wasserzeichen Wizard
ScriptDemo
Neues Fenster für Demo öffnen
Statistik
17045 Aufrufe davon 0x gestern
Keine Beschreibung vorhanden.
Javascript-Quellcode
(einfach markieren, kopieren und lokal abspeichern)
<script language="JavaScript"> <!-- start // (c) 2000-2001 ricocheting <ricocheting@hotmail.com> function generate(){ link1=''; link2=''; link3=''; text=''; js=''; style=''; if(document.formname.position.selectedIndex==0){ topIE='document.body.scrollTop+10'; leftIE='10'; topNS='window.pageYOffset+10'; leftNS='10'; textalign="ALIGN=LEFT" // put the JavaScript if the watermark is to be in the // Top Right ( js='<script>whatever it would be...</scribt>'; ) } if(document.formname.position.selectedIndex==1){ width=130; if (document.formname.type[1].checked) { width=document.formname.width.value} topIE='document.body.scrollTop+10'; leftIE='document.body.clientWidth-20-'+width; topNS='window.pageYOffset+10'; leftNS='window.innerWidth-25-'+width; textalign="ALIGN=RIGHT" // put the JavaScript if the watermark is to be in the // Top Left } if(document.formname.position.selectedIndex==2){ height=30; if (document.formname.type[1].checked) { height=document.formname.height.value} topIE='document.body.scrollTop+document.body.clientHeight-'+height; leftIE='10'; topNS='window.pageYOffset+window.innerHeight-'+height; leftNS='10'; textalign="ALIGN=Left" // put the JavaScript if the watermark is to be in the // Bottom Right } if(document.formname.position.selectedIndex==3){ height=30; width=130; if (document.formname.type[1].checked) { height=document.formname.height.value width=document.formname.width.value} topIE='document.body.scrollTop+document.body.clientHeight-'+height; leftIE='document.body.clientWidth-20-'+width; topNS='window.pageYOffset+window.innerHeight-'+height; leftNS='window.innerWidth-25-'+width; textalign="ALIGN=RIGHT" // I already put the JavaScript if the watermark is to be in the // Bottom Left } js='<SCRIPT language="javascript">\nfunction makeStatic() {\n'+ 'if (document.all) {watermark.style.pixelTop = '+topIE+'}\n'+ 'else {eval(document.watermark.top=eval('+topNS+'));}}\n'+ 'setInterval("makeStatic()",1);\n\nfunction position() {\n'+ 'if (document.all) {\nwatermark.style.pixelLeft = '+leftIE+';\n'+ 'setTimeout(\'watermark.style.visibility = "visible"\', 50)}\nif (document.layers) {\n'+ 'document.watermark.left += '+leftNS+';\n'+ 'setTimeout(\'document.watermark.visibility = "visible"\', 50)}}\nposition();\n<'+'/SCRIPT>'; // image start if(document.formname.type[1].checked){ if(document.formname.imagefilter.selectedIndex==1){ var style=' STYLE="filter: alpha(style=1, opacity='+document.formname.totalper.value+'); width:'+document.formname.width.value+'; height:'+document.formname.height.value+';"'; } if(document.formname.imagefilter.selectedIndex==2){ var style=' STYLE="filter: alpha(style=2, opacity='+document.formname.totalper.value+'); width:'+document.formname.width.value+'; height:'+document.formname.height.value+';"'; } if(document.formname.imagefilter.selectedIndex==3){ var style=' STYLE="filter: alpha(style=3, opacity='+document.formname.totalper.value+'); width:'+document.formname.width.value+'; height:'+document.formname.height.value+';"'; } if(document.formname.imagefilter.selectedIndex==4){ var style=' STYLE="filter: alpha(opacity='+document.formname.totalper.value+'); width:'+document.formname.width.value+'; height:'+document.formname.height.value+';"'; } type='<img src="'+document.formname.image.value+'" width="'+document.formname.width.value+'" height="'+document.formname.height.value+'" border=0 alt="'+document.formname.alt.value+'"'+style+'>'; if((document.formname.image.value == 'http://')||(document.formname.image.value=='')){alert('Please enter a URL for your image');} } // text start else{ if(document.formname.textfilter.selectedIndex==0){ var style=' STYLE="width:120; color:#000000;padding:3px"'; } if(document.formname.textfilter.selectedIndex==1){ var style=' STYLE="filter: shadow(color='+document.formname.filtercolor.value+',direction=45); width:120; color:#000000;padding:3px"'; } if(document.formname.textfilter.selectedIndex==2){ var style=' STYLE="filter: glow(Color='+document.formname.filtercolor.value+',Strength=2); width: 120;padding:3px";'; } type='<font face="'+document.formname.textface.value+'" size="'+document.formname.textsize.value+'" color="'+document.formname.textcolor.value+'"'+style+'>'+document.formname.text.value+'</font>';} if((document.formname.link.value != '') && (document.formname.link.value != '-- no link --')){ link1='<a href="'+document.formname.link.value+'" style="text-decoration:none;cursor:hand;">'; link2="</a>";} var div='<DIV '+textalign+' ID="watermark" '+ 'STYLE="Position: Absolute; Left:0px; Top:0px; Z-Index:20; visibility:hidden">\n'+link1+type+link2+'</DIV>\n\n'; document.formname.gencode.value= div+''+js; } // view function view(){ msg=open("","DisplayWindow","menubar=1,scrollbars=1,resizable=1,width=400,height=200"); msg.document.write(document.formname.gencode.value+"\n\nScroll Page to see watermark in action.<br><br><br><br><br><br><br><br><br>\n<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>\n<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>\n<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>\n<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>\n<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>\n<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>"); } //--> </script> <div align=left> <ol> Steps <li><b>Fill in</b> the required information <li><b>Generate</b> the source (button at bottom) <li><b>Preview</b> your menu (button at bottom) <li><b>Copy and Paste</b> the 'Source Code' onto your HTML page </ol> </div> <form name="formname"> <table border=0 cellspacing=0 cellpadding=0> <tr> <td> <!-- outline table --> <table border=0 cellpadding=2 cellspacing=1 width=440> <tr> <td colspan=2> <b>Type of watermark</b> </td> </tr> <tr> <td colspan=2> <input type=radio name="type" checked> <b>Use Text Watermark</b><br> <input type=radio name="type"> <b>Use Image Watermark</b> </td> </tr> <tr> <td height=5></td> </tr> <tr> <td width=50%> <b>Text</b> </td> <td width=50%> <b>Image</b> </td> </tr> <tr> <td align=center valign=top> <table border=0 cellspacing=0 width=100%> <tr> <td align=center colspan=2> Text in watermark:<br> <input type=text name=text value="My Page" onFocus="if(document.formname.type[1].checked){alert('If you want to use Text as your watermark, please change the above radio button to \'Use Text Watermark\'.\n\nOtherwise you can leave these options blank.')}"> </td> </tr> <tr> <td align=right> Font face: </td> <td> <input type=text name=textface value="verdana" size=10> </td> </tr> <tr> <td align=right> Font size: </td> <td> <input type=text name=textsize value="2" size=3> </td> </tr> <tr> <td align=right> Font color: </td> <td> <input type=text name=textcolor value="#000000" size=8> </td> </tr> <tr> <td align=right> Filter: </td> <td> <select name="textfilter"> <option selected>No effects <option>3-D Text <option>Glowing Text </select> </td> </tr> <tr> <td align=right>Filter Color: </td> <td> <input type=TEXT name=filtercolor value="#aaaaaa" size=8> </td> </tr> </table> </td> <td align=center valign=top> <table border=0 cellspacing=0 width="100%"> <tr> <td align=center colspan=2> Image in watermark:<br> <input type=text name=image size=25 onFocus="if(document.formname.type[0].checked){alert('If you want to use an image in the watermark, please change the above radio button to \'Use Image Watermark\'.\n\nOtherwise you can leave these options blank.')}"> </td> </tr> <tr> <td align=right> Alt tag: </td> <td> <input type=text name=alt size=14 value="Watermark"> </td> </tr> <tr> <td align=right> Width: </td> <td> <input type=text name=width size=4 value=50> </td> </tr> <tr> <td align=right> Height: </td> <td> <input type=text name=height size=4 value=50> </td> </tr> <tr> <td align=right> Filter: </td> <td> <select name="imagefilter"> <option selected>No effects <option>Gradient Fade <option>Circular Fade <option>Edges Fade <option>Total Fade </select> </td> </tr> <tr> <td align=right>Fade: </td> <td> <input type=text name=totalper size=3 value=70> %</td> </tr> </table> </td> </tr> <tr> <td height=5></td> </tr> <tr> <td align=right> Position: </td> <td align=left> <select name=position> <option>Top Left <option>Top Right <option>Bottom Left <option selected>Bottom Right </select> </td> </tr> <tr> <td align=right> Make this a link to: </td> <td align=left> <input type=text name=link value="-- no link --" onFocus="if(value=='-- no link --'){value='http://'}"> </td> </tr> <tr> <td height=35 align=center colspan=2> <input type="button" class=button value="Generate" onClick="generate();" name="button"> <input type="button" class=button value="Preview my Watermark" onClick="view();" name="button"> <input type="reset" class=button value="Reset" name="reset"> </td> </tr> </table> </td> </tr> </table> <br> Source Code: <br> <textarea name="gencode" rows=10 cols=55 wrap=1></textarea> <div align="left"> <ul> <font color="#CC6666" size=4><b> Bonus Notes:</b></font> <li>The filter options only work in <b>Internet Explorer</b>. <li>The watermark itself should work in both IE 4+ and NS 4+. </ul> </div> </form>
Kommentare zu
Wasserzeichen Wizard
0 Kommentar(e) vorhanden / Anzeige der neuesten 5
Noch keine Kommentare zu diesem Javascript vorhanden.
Alle Kommentare anzeigen
-
Kommentar hinzufügen
© PERL/CGI/
PHP
/JS/SCRIPT/unity.de 1998-2009 .::.
interaktiv.shop
.::.
CGI-Service
.::.
Kontakt
.::.
Impressum
Link: /javascript/scripts/javascript_0258_main.shtml .::. Aufrufe heute: 1 .::. Aufrufe gesamt: 10442