html link for mouse hover
I'm looking for something similar to the a html a tag title text but I want the text to come from a separate file.
For example
<a href="xyz.htm" title=开发者_Go百科"how do I retrieve this text from a file?">whatever</a>
IF you do not have access to server side scripting, then you can have your javascript make an ajax request to the file. Javascritp can open files, but they have to be server readable.
Javascript cannot read from file.
But anyway that is not what you want. You most probably want the text to come from a file in the server, rather than a file from the client machine.
You need server side technologies (PHP, ASP, JSP/java...) for this.
UPDATE:
Ok. You don't have server side technologies. So this is not directly possible. But, first: how are yout HTML pages generated? Hand-coded or generated by some system (a CMS, for instance)?
If you are hand coding your HTML, you need the content of the "title" dynamically (from a file), then this is not possible. HTML or related technologies cannot "directly" read a file, and definitely not a file on the server.
If your HTML is generated by some sort of a generator, then possibly you can integrate this with that system itself.
I absolutely have no idea about the requirements, but is it possible to generate the HTML file based on your "configuration" file with the text everytime the text file changes.
BTW, how complex is your HTML?
精彩评论