I want to run js inside CSS when the page loaded.
Is this possible?
html{
width: expression(document.getElementById('BeneficiaryLabel').innerHTML = 'test');
}
this doesn’t work.
Thanks
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.
This is absolutely not possible.
You have it a bit backwards: You’ll have to call your Javascript from within the HTML document, not the CSS.
Use the JS to select the CSS then apply your width function.