Assuming you want to disable the form fields on Edit form.
For Single line of text field: Consider column name is - Title
$(document).ready(function(){
if($("input[title^='Title']").val()) {
$("input[title^='Title']").attr("disabled", "disabled");
//$("input[title^='Title']").attr("readonly", "readonly");
}
});
For Number field: Consider column name is - Content Amount
$(document).ready(function(){
if($("input[title^='Content Amount']").val() != "0") {
$("input[title^='Content Amount']").attr("disabled", "disabled");
//$("input[title^='Content Amount']").attr("readonly", "readonly");
}
});