1

I'm including a SVG document with a object tag in a webpage.

<html>
    <head>
         <title>CA/7GroupPDZBP2</title>
    </head>
    <body>
         <object data=".\toto.svg" height="400" src=".\toto.svg" type="image/svg+xml" width="100%"></object>
    <body>
</html>

In my toto.svg document i have some links like this :

<svg style="background-color:transparent;" version="1.1" viewBox="0 0 1925 476" width="1925" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
    <a style="cursor:pointer;" xlink:href="page2.html">
        <text>Tony</text>
    </a>
</svg>

However if i click on the link, only the content of the object tag is replaced by the destination link in my page. The whole page is not refreshing.

Anyone knows how to solve this problem ?

Thanks for your help, Cuva


Specify target="_top" on the link according to http://www.w3.org/TR/SVG/linking.html#Links

4

1 回答 1

3

根据http://www.w3.org/TR/SVG/linking.html#Links在链接上指定 target="_top"

于 2012-06-10T18:22:08.457 回答