If i have the following code in my html file
<div id=div1>
<script type="text/javascript">
externalFunction();
</script>
Is it possible to get the id of the div in the method externalFunction()?
Regards
Damien
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You mean the id? Name is different. The short answer is no, the longer answer is you can if you know something about the div you are looking for ( such as the class or where it’s located or anything else.)