简体   繁体   中英

Accessing Resx in Javascript

Okay I trying to make site handle different languages so I am using a resx file.

I can display simply Welcome on aspx page like this:

<asp:Label runat='server' ID="foo" meta:resourcekey='WelcomeText'/>

Now I want to be able to use javascript to do innerHTML:

"<div>
    <asp:Label runat='server' ID="foo" meta:resourcekey='WelcomeText'/>
</div>"

But it does not work like that. I have tried to also do getElementById which keeps returning null.

Any Ideas?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM