Thanks for your help!!!
In the below code the two html buttons show a pop up message, different for every button.
[{"id":"5f4b8b13.af3a84","type":"ui_template","z":"5087a524.121224","group":"4e5b45cb.163f3c","name":"","order":5,"width":0,"height":0,"format":"<!DOCTYPE html>\n<html>\n<body>\n \n\n <div>\n <button id=\"btn1\" type=\"button\" class=\"button clear\" data-action=\"clear\">Clear</button>\n <button id=\"btn2\" type=\"button\" class=\"button save\" data-action=\"save\">Save</button>\n </div>\n\n<md-button id=\"btn1\" class=\"button save\" ng-click=\"send({topic:'clicked', payload:'Clear'})\">Clear</md-button>\n<md-button id=\"btn2\" class=\"button save\" ng-click=\"send({topic:'clicked', payload:'Save'})\">Save</md-button>\n \n \n<script>\nvar x = document.getElementById(\"btn1\");\nx.addEventListener(\"click\", Function1);\n\nvar x = document.getElementById(\"btn2\");\nx.addEventListener(\"click\", Function2);\n\nfunction Function1() {\nalert (\"Clear\");\n}\n\n\nfunction Function2() {\nalert (\"Save\");\n}\n\n</script>\n\n</body>\n\n</html>","storeOutMessages":true,"fwdInMessages":true,"templateScope":"local","x":1020,"y":760,"wires":[["27560da1.b027c2"]]},{"id":"72244df.a895eb4","type":"ui_button","z":"5087a524.121224","name":"","group":"4e5b45cb.163f3c","order":6,"width":"2","height":"2","passthru":false,"label":"CLEAR","tooltip":"","color":"","bgcolor":"","icon":"","payload":"clear","payloadType":"str","topic":"","x":760,"y":760,"wires":[["5f4b8b13.af3a84"]]},{"id":"709bca52.73b784","type":"ui_button","z":"5087a524.121224","name":"","group":"4e5b45cb.163f3c","order":6,"width":"2","height":"2","passthru":false,"label":"SAVE","tooltip":"","color":"","bgcolor":"","icon":"","payload":"save","payloadType":"str","topic":"","x":750,"y":800,"wires":[["5f4b8b13.af3a84"]]},{"id":"27560da1.b027c2","type":"debug","z":"5087a524.121224","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1170,"y":760,"wires":[]},{"id":"4e5b45cb.163f3c","type":"ui_group","z":"","name":"Logo","tab":"2df54972.e9d336","order":1,"disp":false,"width":"4","collapse":false},{"id":"2df54972.e9d336","type":"ui_tab","z":"","name":"EVEXIA","icon":"dashboard","order":4,"disabled":false,"hidden":false}]
How can I activate the same operation (show a popup message) with the ui_buttons and md-button through the Function1 and Function2 of ui_template?