svnno****@sourc*****
svnno****@sourc*****
2009年 10月 8日 (木) 23:20:50 JST
Revision: 1317
http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1317
Author: dhrname
Date: 2009-10-08 23:20:50 +0900 (Thu, 08 Oct 2009)
Log Message:
-----------
外部ファイルに
Modified Paths:
--------------
trunk/svginhtml.html
Modified: trunk/svginhtml.html
===================================================================
--- trunk/svginhtml.html 2009-10-08 14:20:15 UTC (rev 1316)
+++ trunk/svginhtml.html 2009-10-08 14:20:50 UTC (rev 1317)
@@ -5,27 +5,7 @@
<script defer="defer" type="text/javascript" src="sie.js"></script>
</head>
<body>
-<script type="text/javascript"><!--
-function _wo(){
- var sc = document.getElementsByTagName("script"), source = "";
- for (var i=0;i<sc.length;++i) {
- if (sc[i].getAttribute("type") === "text/svg") {
- source = sc[i].text.replace(/<svg([^>]*)>/g, '<script type="image/svg+xml" $1><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" $1>')
- .replace(/<\/svg>/g, "</svg></script>")
- .replace(/\shref=/g, "xlnk:href=")
- .replace(/<\/(body|html)>/g, "");
- }
- }
- document.getElementById("hogehoge").innerHTML = source;
- var isOpera = (window.opera !== void 0); //Operaだったらtrueを返す
- if (isOpera){
- svgtovml();
- }
-}
-window.onload = _wo;
- document.write('<div id="hogehoge"></div>');
- document.write('<script type="text/svg"><p style="display:none;">n</p>');
---></script>
+<script type="text/javascript" src="svginhtml.js"></script>
<h1>SVG in HTML - SIE</h1>
<svg width="200" height="200">
<rect x="20" y="30" width="30" height="300" fill="red"/>