高分求救!!

如何得到引用的SRC源地址?
比如

1<scritp src="http://127.0.0.1/123.php"></scritp>

这样才可以得到"http://127.0.0.1/123.php"

---------------------------------------------------------------

1<script id="script1" src="http://127.0.0.1/123.php"></script>

use document.scripts[n].src, where n is the 0-based index for scripts

1<input onclick="alert(document.scripts[0].src);" type="button" value="Get"/>

or

1<input onclick="alert(document.all('script1').src);" type="button" value="Get"/>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus