One of the possible solutions would be to override delete button -- create custom JS button with code like this:
var data = sforce.connection.query("SELECT Name, Id
FROM Account
WHERE Id = '"+Account.Id+"'"
);
var record = data[0];
if (record){
var criteria = false;
//check some criteria
// if (record.Name = 'To Remove') criteria = true;
if (criteria){
result = sforce.connection.delete(record);
if (!result[0].getBoolean("success")) alert("delete failed");
}else{
alert("Can not delete record because of criteria");
}
}
I would recommend to put all criteria in the trigger because if record would be deleted from someone else -- criteria from JS would not work, and just handle error thrown by trigger and display in page.
If you don't like alert methods - you could use custom JS to display error on page - here are some examples: https://success.salesforce.com/answers?id=90630000000h9p6AAA.
What else can be done by JS - https://resources.docs.salesforce.com/sfdc/pdf/apex_ajax.pdf