Problems with events

Hello friends. I need help. I’m trying to understand how to work with hass. I try to create a card and create click events at the moment. I can not find the elements to create the event. getElementById can not find the object.
Does someone explain to me how I should do it in this environment?
Thank you.

timerCard(entity) {
    this.strExtendHTML = entity;
    this.strExtendHTML += `<table>
                <form method="post" action="tm" onsubmit="return st();">
                    <tr align="center"><td colspan='3'><input id="e0" name="e0" type="checkbox"><b>Habilitar Temporizadores</b></td></tr>
                    <tr><td colspan='3'><div id="bt" name="bt"><div id="oa" name="oa"><b>Salida</b>&nbsp;<span><select style="width:60px;" id="d1" name="d1"><option>1</option></select></span>&emsp;<b>Estado</b>&nbsp;<select style="width:99px;" id="p1" name="p1"><option>Apagado</option><option>Encendido</option><option>Conmutar</option><option>Regla</option></select></div></td></tr>  
                    <tr><td><input id="b0" name="rd" type="radio" value="0" onclick="gt();"><b>Hora</b></td><td><input id="b1" name="rd" type="radio" value="1" onclick="gt();"><b>Salida del Sol</b> (04:53)</td><td><input id="b2" name="rd" type="radio" value="2" onclick="gt();"><b>Puesta del Sol</b> (20:41)</td></tr>
                    <tr><td colspan='3><select style="width:46px;" id="dr" name="dr" disabled=""><option>+</option><option>-</option></select><span><select style="width:60px;" id="ho" name="ho"><option>00</option><option>01</option><option>02</option><option>03</option><option>04</option><option>05</option><option>06</option><option>07</option><option>08</option><option>09</option><option>10</option><option>11</option><option>12</option><option>13</option><option>14</option><option>15</option><option>16</option><option>17</option><option>18</option><option>19</option><option>20</option><option>21</option><option>22</option><option>23</option></select></span>&nbsp;:&nbsp;<span><select style="width:60px;" id="mi" name="mi"><option>00</option><option>01</option><option>02</option><option>03</option><option>04</option><option>05</option><option>06</option><option>07</option><option>08</option><option>09</option><option>10</option><option>11</option><option>12</option><option>13</option><option>14</option><option>15</option><option>16</option><option>17</option><option>18</option><option>19</option><option>20</option><option>21</option><option>22</option><option>23</option><option>24</option><option>25</option><option>26</option><option>27</option><option>28</option><option>29</option><option>30</option><option>31</option><option>32</option><option>33</option><option>34</option><option>35</option><option>36</option><option>37</option><option>38</option><option>39</option><option>40</option><option>41</option><option>42</option><option>43</option><option>44</option><option>45</option><option>46</option><option>47</option><option>48</option><option>49</option><option>50</option><option>51</option><option>52</option><option>53</option><option>54</option><option>55</option><option>56</option><option>57</option><option>58</option><option>59</option></select></span><b>+/-</b>&nbsp;<span><select style="width:60px;" id="mw" name="mw"><option>00</option><option>01</option><option>02</option><option>03</option><option>04</option><option>05</option><option>06</option><option>07</option><option>08</option><option>09</option><option>10</option><option>11</option><option>12</option><option>13</option><option>14</option><option>15</option></select></span></tr></td>
                    <tr><td colspan='3'><div  align="center" id="ds" name="ds"><input id="w0" name="w0" type="checkbox"><b>Dom</b><input id="w1" name="w1" type="checkbox"><b>Lun</b> <input id="w2" name="w2" type="checkbox"><b>Mar</b> <input id="w3" name="w3" type="checkbox"><b>Mie</b> <input id="w4" name="w4" type="checkbox"><b>Jue</b> <input id="w5" name="w5" type="checkbox"><b>Vie</b> <input id="w6" name="w6" type="checkbox"><b>Sab</b> </div></td></tr>                            
                    <tr align="center"><td colspan='3'><button onclick="grabar();" id="save" name="save" type="submit" >Grabar</button></td></tr>
                </form>
            </table>
    `;           
    this.contentExtend.innerHTML = this.strExtendHTML;
    var element = document.getElementById("save");
    element.addEventListener('click', event => {
            alert('asdasdas');
    });

}