How do i check whether the "Buttonid" contain some value?

Posted by Mahe under JavaScript on 7/23/2012 | Points: 10 | Views : 870 | Status : [Member] | Replies : 2
Hi,

How do i check whether the "Buttonid" contain some value?
There is no "contains" ,"has" property.
Please use either Javascript or jQuery.

How to resolve it?

Regards,
Mahe




Responses

Posted by: Jayakumars on: 9/29/2012 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi

try this code

function Jscript1() {
var t1 = document.getElementById("Button1").value;
alert(t1);
}
<asp:Button ID="bt1" runat="server" Text ="Jesus" OnClientClick="Jscript1();"/>
<asp:Button ID="Button1" runat="server" Text ="Jehovah" />


Mark as Answer if its helpful to you

Mahe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Jayakumars on: 9/29/2012 [Member] [MVP] Bronze | Points: 25

Up
0
Down
hi

Please mark as answer if it helpful to you.

Mark as Answer if its helpful to you

Mahe, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response