別のタグを使用して、あるタグのURLを変更しようとしています。それを動作させることができません。助けてください。
これが私のコードです:
<a href="#" rel="wd" onclick="updateUrl('wd')">Category</a>
<a id="test" href="index.php?path=portfolio/web" class="thumbnail"><img src="img.jpg"></a>
<script type="text/javascript">
function updateUrl(newUrl)
{
document.links["test"].href .= newUrl;
}
</script>