| テキスト テキストのレッスンに戻る <script language="JavaScript1.2"> <!-- /* * Other parts required but not shown here: * In the HTML file, the form tag contains the following attribute: * * onsubmit="set_font(); return false;" * * And the input type=button tag in the form contains the following attribute: * * onclick="set_font()" */ /* * This function sets the font-family property of the "text_block" * SVG element according to the value entered in the form. */ function set_font () { var svgobj; var svgstyle; var svgdoc = document.SVG04a.getSVGDocument(); var selected_font = document.manipulate.textfont.selectedIndex; svgobj = svgdoc.getElementById('text_block'); svgstyle = svgobj.getStyle(); svgstyle.setProperty ("font-family", document.manipulate.textfont.options[selected_font].value); } // --> </script> テキストのレッスンに戻る |