How to set control's borders through Javascript?

 Posted by vishalneeraj-24503 on 6/6/2014 | Category: ASP.NET Interview questions | Views: 265 | Points: 40
Answer:

Place following code in Head tag and call that function in Button onClientClick client-side event as:-
<script type="text/javascript">

function setborder()
{
document.getElementById('Button19').style.borderWidth = "5px";
document.getElementById('Button19').style.borders = "dashed";
}
</script>


And call above function as:-
<asp:Button ID="Button18" runat="server" Text="Border Width 9" OnClientClick="setborder(); return false;" />


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response