cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - Activehtmlicon-personicon-teamoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              <h1>測地系変換</h1>
<p>
日本測地系の緯度経度と、世界測地系の緯度経度を変換
</p>
<div>
	<h2>日本測地系</h2>
緯度:<input type="text" id="ja_lat" value="35.697796" />, 経度:<input type="text" id="ja_lng" value="139.755464" />
</div>

<button id="convert_world" type="button">日本→世界</button>
<button id="convert_japan" type="button">世界→日本</button>
<div>
	<h2>世界測地系</h2>
	緯度:<input type="text" id="wo_lat" />, 経度:<input type="text" id="wo_lng" />
</div>
            
          
!
            
              var ja_lat = document.getElementById("ja_lat");
var ja_lng = document.getElementById("ja_lng");
var wo_lat = document.getElementById("wo_lat");
var wo_lng = document.getElementById("wo_lng");

var convert_world = function() {
	console.log('!');
	wo_lat.value = +ja_lat.value * 1.000106961 - +ja_lng.value * 0.000017467 - 0.004602017;
	wo_lng.value = +ja_lng.value * 1.000083049 + +ja_lat.value * 0.000046047 - 0.010041046;
};
var convert_japan = function() {
	console.log('!');
	ja_lat.value = +wo_lat.value - +wo_lat.value * 0.00010695 + +wo_lng.value * 0.000017464 + 0.0046017;
	ja_lng.value = +wo_lng.value - +wo_lat.value * 0.000046038 - +wo_lng.value * 0.000083043 + 0.010040;
};

document.getElementById("convert_world").addEventListener('click', convert_world, false);
document.getElementById("convert_japan").addEventListener('click', convert_japan, false);

            
          
!
999px
Close

Asset uploading is a PRO feature.

As a PRO member, you can drag-and-drop upload files here to use as resources. Images, Libraries, JSON data... anything you want. You can even edit them anytime, like any other code on CodePen.

Go PRO

Loading ..................

Console