Apply jquery on Textbox
1. SharePoint TextBox
- <SharePoint:FormField runat="server" id="ff30{$Pos}" ControlMode="Edit" FieldName="FieldName1" __designer:bind="{ddwrt:DataBind('u',concat('ff30',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@FieldName1')}"/>
- * $("input[title='[Field title name']']").val();
- * alert($("input[title='FieldName1']").val());
2. Asp Control TextBox
- <asp:TextBox runat="server" ID="txtbxID" CssClass="txtbxStyle" MaxLength="255"></asp:TextBox>
- * alert($("#<%= txtbxID.ClientID %>").val());
- * alert($('.txtbxStyle').val());
- * alert($("input[id$='txtbxemailid']").val());
3. HTML Control
- <input type="text" id="txtbxID" class="textbxClass" />
- * alert($("#<%= txtbxID%>").val());
- * alert($('.textbxClass').val());
- * alert($("#txtbxID").val());
Apply jquery on Checkbox
SharePoint TextBox
- <SharePoint:FormField runat="server" id="ff30{$Pos}" ControlMode="Edit" FieldName="FieldName1" __designer:bind="{ddwrt:DataBind('u',concat('ff30',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@FieldName1')}"/>
- * $("input[title='[Field title name']']").val();
- * alert($("input[title='FieldName1']").val());