HighDots Forums  

sovrascrivere un link

Javascript (Italian) Il linguaggio JavaScript (it.comp.lang.javascript)


Discuss sovrascrivere un link in the Javascript (Italian) forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Alen Cappelletti
 
Posts: n/a

Default sovrascrivere un link - 07-08-2005 , 12:10 PM






Ciao a tutti,
mi trovo ad affrontare un problemino nuovo...ossia:

<a href="MyPage.asp?" id="BunLink">

Ora con JS dovrei aggiungere al valore nell'href
una variabile ossia -- Tot=(+NUMERO) --

In pratica gli devo passare un numero.

So ed uso la proprietà
getElementById('BunLink').innerHTML = '' per il testo del link
ma per cambiare href come faccio?


Grazie e TNKS a tutti


Reply With Quote
  #2  
Old   
bigliard
 
Posts: n/a

Default Re: sovrascrivere un link - 07-08-2005 , 12:43 PM






Alen Cappelletti wrote:
Quote:
Ciao a tutti,
mi trovo ad affrontare un problemino nuovo...ossia:

a href="MyPage.asp?" id="BunLink"
Puoi fare così:

function doOnclick(a)
{
a.href += "Tot=1"
}

<a href="MyPage.asp?" id="BunLink" onclick="doOnclick(this);">


Gaetano



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.