简体   繁体   中英

SVG: Include more than one external .js-file

I thought it`s as simple as HTML to include multiple external scripts in SVG. But false ...

<script type="text/javascript" xlink:href="js/First_Script.js"/>
<script type="text/javascript" xlink:href="js/Second_Script.js"/>

doing like this, none of the scripts will work.

It's not possible for me to include the content of the second script into the first, because the first will be automatically rewritten by a function in an external program.

any suggestion?

Cheers ... Peedy

use <script></script> instead of <script/> . this is a known issue with script tag and svg.

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