Urmatorul script adauga un efect de flash-border obiectelor din pagina HTML (poate fi folosit pentru imagini, cadre <div> sau alte elemente HTML).
Mai jos puteti vedea efectul pentru o imagine si un cadru b<div>.
Eticheta DIV
<style type="text/css">
<!--
.flashgr {
border:4px solid #abcdef;
}
-->
</style>
<img src="imgs/img1.jpg" id="flash0" class="flashgr"><br><br>- Daca doriti sa folositi acest efect pentru mai multe elemente din pagina, tineti cont de urmatoarele doua lucruri:
<div id="flash1" class="flashgr" style="width:250px; height:100px;">Eticheta DIV</div>
<script type="text/javascript">
<!--
// https://marplo.net
// Scriptul trebuie adaugat la sfarsit, deasupra lui /BODY
// Aici setati culoare pt. flash
var flashcolor="#fe3333"
// setati viteza de flash (mai mic mai repede)
var speed=150
// Matricele pentru fiecare margine si obiect
var margine=new Array()
var increment=0
var flashobj=new Array()
// Adauga efectul fiecarei margini si obiect
// Parcurgand matricele
if (document.all||document.getElementById) {
while (document.getElementById("flash"+increment)!=null) {
flashobj[increment]=document.getElementById? document.getElementById("flash"+increment).style : eval("document.all.flash"+increment+".style")
margine[increment]=0;
increment++
}
}
// Seteaza flash-ul pt. fiecare margine
function flash(obj) {
if (margine[obj]==1) {
flashobj[obj].borderLeftColor=flashcolor
flashobj[obj].borderBottomColor=flashobj[obj].borderRightColor
}
else if (margine[obj]==2) {
flashobj[obj].borderTopColor=flashcolor
flashobj[obj].borderLeftColor=flashobj[obj].borderBottomColor
}
else if (margine[obj]==3) {
flashobj[obj].borderRightColor=flashcolor
flashobj[obj].borderTopColor=flashobj[obj].borderLeftColor
}
else if (margine[obj]==4) {
flashobj[obj].borderBottomColor=flashcolor
flashobj[obj].borderRightColor=flashobj[obj].borderTopColor
}
if (margine[obj]<=3)
margine[obj]++
else
margine[obj]=1
}
// Schimba flash-ul pe cate o margine, successiv
if (document.all||document.getElementById) {
for (z=0;z<flashobj.length;z++) {
var temp='setInterval("flash('+z+')",'+speed+')'
eval(temp)
}
}
//-->
</script>
<object type="application/x-shockwave-flash" data="file.swf" width="500" height="250"> <param name="src" value="file.swf" /> Browser-ul dv. nu suporta SWF. </object>
input:focus { background-color: #88fe88; }
var jsnstr = '{"url": "http://coursesweb.net/", "title": "Web Development Courses"}'; var obj = JSON.parse(jsnstr); alert(obj.url);
if (file_put_contents("file.txt", "content")) echo "Fisierul a fost creat"; else echo "Fisierul nu poate fi creat";
I planted the third tree. - Am plantat al treilea pom.
Yo planté el tercero árbol. - Am plantat al treilea pom.