Want to set 'src' of script to my IP.
- by Ozaki
I have a script that links to the server I am hosting (IP can change) usually I would just use for links:
var url ='http://' + window.location.hostname + 'end of url';
But in this case it isnt appearing to be so easy.
I have tried: (1)
$('#scriptid').attr('src', url);
as well as: (2)
var script = document.createElement( 'script' );…