Copy codeThe Code is as follows:
<Title> my Chat History </title>
<Base target = "_ self"/>
<Script src = "./JS/jquery-1.4.2.min.js" type = "text/javascript"> </script>
<Script>
$ (Document). ready (function (){
$ ('A [href] [href! = "#"] '). Click (function (){
SetSelfTarget (this );
});
$ ('Input'). click (function (){
SetSelfTarget (this );
});
});
Function SetTarget (){
Var htmTarget = document. getElementsByTagName ("head ");
If (undefined! = HtmTarget) & (0 Var B = htmTarget [0]. getElementsByTagName ("base ");
If (undefined! = B) & (0 <B. length )){
B42402.16.tar get = "download ";
}
}
}
Function SetSelfTarget (obj ){
If (obj. id! = "Btn_Export "){
Var htmTarget = document. getElementsByTagName ("head ");
If (undefined! = HtmTarget) & (0 Var B = htmTarget [0]. getElementsByTagName ("base ");
If (undefined! = B) & (0 <B. length ))
B1_02.16.tar get = "_ self ";
}
}
}
</Script>
<Asp: Button ID = "btn_Export" runat = "server" Text = "Export" OnClick = "btn_Export_Click" OnClientClick = "SetTarget ()"/>