How to set control's borders through Javascript?

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

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";

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