Мне нужна помощь, чтобы написать оператор if, используя jquery. Поэтому, если result.d.ProductName пусто, не показывать `$ (prdHtml) .html (html);
$.ajax({
type: "POST",
url: "Services.asmx/GetProduct",
data: '{ "fieldName": "' + id + '"}',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(results) {
var html = '<h3>' + results.d.ProductName + '<h3>'
+ '<a href=""' + results.d.Url + '</a>';
$(prdHtml).html(html);