SVGの印刷
SVGの印刷のレッスンに戻る
<script language="JavaScript1.2">
<!--
	/*
	* Other parts required but not shown here:
	* In the HTML file, the checkboxes in the form below the SVG image each
	* have the following attribute:
	*
	*  onclick="hilite_elem(this,'topography')"
	*
	* Where 'topography' is replaced by the name of the SVG element that should
	* be turned on/off whenever that checkbox button is click on.
	*/
	/*
	* This function turns on/off various layers of the SVG picture.
	* It is called when the user clicks on any of the checkboxes in
	* the form below.
	*
	* Input Parameters:
	*   checkbox     - Form object (checkbox) that was clicked on.
	*   element_name - SVG element name that should be made visible/
	*                  invisible.
	*/
	function hilite_elem (checkbox, element_name)
	{
		var svgobj;
		var svgstyle;
		var svgdoc = document.printable_map.getSVGDocument();
		// For each element, get the element's style object, then set
		// its visibility according to the state of the checkbox.
		svgobj = svgdoc.getElementById(element_name);
		svgstyle = svgobj.getStyle();
		if (!checkbox.checked)
		{
			// Hide layer.
			svgstyle.setProperty('visibility', 'hidden');
		}
		else
		{
			// SHow layer.
			svgstyle.setProperty('visibility', 'visible');
		}
	}
// -->
</script>
SVGの印刷のレッスンに戻る