<div style="display:none" id="idThisStudentsEmail"><?!= PropertiesService.getScriptProperties().getProperty('userEmail') ?></div>
<script>
window.onload = function() {
var theStudentsEmail;
theStudentsEmail = document.getElementById('idThisStudentsEmail').textContent;//Get the students email out of the div element
console.log('theStudentsEmail: ' + theStudentsEmail)
}
</script>
--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/Y1ILdHujPu0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/0e285c42-bf51-43b5-97e0-93b8bc28abb8%40googlegroups.com.
Important Information
______________________
This correspondence, and any files transmitted with it, are for the named person(s) use only. They may contain confidential or legally privileged information or both. No confidentiality or privilege is waived or lost by any mis-transmission. If you receive this correspondence in error, please immediately delete it from your system and notify the sender. You must not disclose, copy or relay on any part of this correspondence if you are not the intended recipient.
Any opinions expressed in this message are those of the individual sender, except where the sender expressly, and with authority, states them to be the opinions of The Kuala Lumpur Alice Smith School ("KLASS"), a school wholly-owned by The Alice Smith Schools Association ("ASSA").
Neither the sender nor KLASS warrants that any communication via the internet is free of errors, viruses, interception or interference.
______________________
var email = document.getElementById('idThisStudentsEmail').textContent;
To get the email out of the <div> element at any time.
The:
document.getElementById()
method is part of the DOM (Document Object Model) of HTML.
People often think that "document.getElementById()" is JavaScript but it's not.