I want to pass the texttbox id to javascript function and change the color of the textbox if the value is null.
function fnOnUpdateValidatorsNewChangeChange(txtid) {
var txt1 = document.getElementById(txtid);
var Value = document.getElementById(txtid).value
if (Value == "") {
txt1.style.background = "#FFF000";
}
}
<asp:TextBox runat="server" ID="txtlabelID" class="textbox" TextMode="SingleLine"
onchange="fnOnUpdateValidatorsNewChangeChange('<%= txtlabelID.ClientID %>')"
But it's getting Null error.
var Value = document.getElementById(txtid).value;