[Solved] Edit a link with javascript prototype [closed]


try this: http://jsfiddle.net/mig1098/ex6efsce/

var d = document.getElementById('schedule');

var chil = d.children[0];
var data = prompt('your data');

chil.setAttribute('href','/schedule?sku='+data);
alert(chil);

var url = chil.getAttribute('href');
var m = url.replace(/\/schedule\?sku\=/,'');
var r = document.getElementById('resp');
r.value = m;

1

solved Edit a link with javascript prototype [closed]