davidleathers113

JavaScript Code

Sep 25th, 2023
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. document.getElementById('signatureField1').addEventListener('input', function() {
  2. if (this.value) { // checks if the input field has a value
  3. var timestamp1 = new Date().toISOString();
  4. document.getElementById('timestampField1').value = timestamp1;
  5. }
  6. });
  7.  
  8. document.getElementById('signatureField2').addEventListener('input', function() {
  9. if (this.value) { // checks if the input field has a value
  10. var timestamp2 = new Date().toISOString();
  11. document.getElementById('timestampField2').value = timestamp2;
  12. }
  13. });
  14.  
Advertisement
Add Comment
Please, Sign In to add comment