I want move HTML tag inside JavaScript
My HTML Code is:
<tr>
...
<td><a href="#" onclick="window.open('{{ url('hotel/cancel-policy?NationCd='.$hotel_request['NationCd'].'&CityCd='.$hotel_request['CityCd'].'&CheckIn='.$hotel_request['CheckIn'].'&CheckOut='.$hotel_request['CheckOut'].'&Sgl='.$hotel_request['Sgl'].'&Dbl='.$hotel_request['Dbl']) }}', 'newwindow', 'width=300, height=250'); return false;">Cancel Policy</a></td>
...
</tr>
My JavaScript Code is:
...
elem.append('<tr>\
...
<td><a href="#" onclick="window.open('url('hotel/cancel-policy?NationCd='+NationCd+'&CityCd='+CityCd+'&CheckIn='+CheckIn+'&CheckOut='+CheckOut+'&Sgl='+Sgl+'&Dbl='+Dbl)', 'newwindow', 'width=300, height=250'); return false;">Cancel Policy</a></td>\
...
</tr>');
...
But, it's not working
var elem = $parent.find('.loading').empty();. How to move html tag(link href) inside javascript? It looks like it's just a matter of writing quotes. But I am confused