For example
<script>
function foo(){...}
</script>
<div><script>foo();</script></div>
<span><script>foo();</script></span>
and I wanted to have foo return “abc” when called from a div, return “123” when called from a span.
Is this possible?
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.
After reading your comment I think you should do something else:
#ad1_empty,#ad2_empty, …)#ad1_full,#ad2_full, …)// code
It is possible to do what you originally wanted, btw (but it’s useless)