I have a page with buttons:
<input type="button" alue="TEST"
style="height:40px;width:120px;"
onClick="javascript:window.location='page.html';" />
I want to convert it to (webui):
<li><a href="page.html">TEST</a></li>
This is the code I have so far: (doesn’t seem to work)
$('<input type="button" value=').replaceWith('<li>');
$('onClick="javascript:window.location=').replaceWith('<a href="');
$('';" />').replaceWith('" target="_self"></a></li>"');
Or in a more general way:
Live example: http://jsfiddle.net/ERLgR/1/