日期:2014-05-17  浏览次数:20733 次

HTML菜鸟问题,求助
如何把下面代码中的IP,改成自动的?直接根据实际访问的网页地址自动适应。
<div style="margin: 50px">
  <a title="rtsp://192.168.12.44:8554/test.264" href="#" onclick="doGo(this.title);return false;">test.264</a>
  <span style="margin: 20px;" />
  <a title="rtsp://192.168.12.44:8554/02.mp3" href="#" onclick="doGo(this.title);return false;">02.mp3</a>
  <span style="margin: 20px;" />
</div>

如何在网页刚进来的时候,马上执行do.Go(rtsp://192.168.12.44:8854/test.264);



------解决方案--------------------
var ip = 'rtsp://'+location.host+'/';