Jump to content
php.lv forumi

Banneru izvietošana


eT`

Recommended Posts

ne man vajag lai piem. uz refreshu mainas banneris. HTML kodā kautvai pats sadrukāšu viņiem visiem atrašanās vietas bet nezinu kā lai izdara ka uz refresh mainās :(

 

bija ideja ko šādu:

<h2>Reklāma</h2>
<table width=100% border=1 cellspacing=0 cellpadding=10><tr><td align=left>
<table class=main border=1 cellspacing=0 cellpadding=5>
<script LANGUAGE="JavaScript">



<!-- Begin
var how_many_ads = 1;
var now = new Date()
var sec = now.getSeconds()
var ad = sec % how_many_ads;
ad +=1;
if (ad==1) {
url="http://unique.alhost.lv/";
banner="http://access.oo.lv/bildes/ubt.png";
width="468";
height="60";
}

document.write('<center>');
document.write('<a href=\"' + url + '\" target=\"_top\">');
document.write('<img src=\"' + banner + '\" width=')
document.write(width + ' height=' + height + ' ');
document.write('alt=\"' + alt + '\" border=0><br>');
document.write('<small>' + txt + '</small></a>');
document.write('</center>');
// End -->
</SCRIPT>
</table></td></tr></table>

 

Bet nezinu vai ir pareizi :(

Edited by eT`
Link to comment
Share on other sites

<img src="" id="banneris" />
<script type="text/javascript">
var banneri = ["img1.gif", "img2.gif", "img3.gif"];
document.getElementById("banneris").src= banneri[Math.floor(Math.random() * banneri.length)];
</script>

Link to comment
Share on other sites

eT` --> Viss tachu atkariigs, ko iisti gribi panaakt....

Taadelj arii jautaaju Vai Obligati nepiecieshams JavaScripts......

Abi ieteiktie varianti ir stradajoshi, un izmantojami ....

---

PHP dod lielakas iespejas dinamiski mainiit saturu , JS vairak izmantojams Ja lapas saturs praktiski nemainiisies (Runaju par konkreto gadijumu), vai tiks izmantots Bez Php .....

(teiksim baneru exchange variantiem ....)

-----

Tieshi baneriem izmantotu PHP .... jo vajadziigs tachu arii mainiit URL ....

---------------

Edited by Grey_Wolf
Link to comment
Share on other sites

×
×
  • Create New...