2014-01-08 38 views

回答

0

尝试使用函数内的window.location财产。

external.js

function doSomething() { 
    alert(window.location.pathname); 
} 

在.aspx文件

<script src="external.js"></script> 
<asp:button id="Button1" onclientclick="doSomething()">