Ticket #18283: gui-control-demo.html

File gui-control-demo.html, 912 bytes (added by cypherpunks, 4 years ago)

demo

Line 
1<!DOCTYPE html>
2<html>
3
4<body onload="showHeightAll()">
5
6<form id="radio_form">
7  <input type="radio" name="radio" value="radio" checked> radio<br>
8</form>
9
10<form id="button_form"> 
11  <input type="submit" value="Submit">
12</form> 
13
14<div id="scrollbar_p"> 
15  <div style="width: 200px; overflow-x: scroll;">test</div>
16</div>
17
18<p id="radio_form_size_p"></p>
19<p id="button_form_size_p"></p>
20<p id="scrollbar_form_size_p"></p>
21
22<script>
23function showHeight(html_element, display_element) {
24  var form = document.getElementById(html_element);
25  var height = getComputedStyle(form).getPropertyValue("height");
26  document.getElementById(display_element).innerHTML = "height " + html_element + ": " + height;
27}
28function showHeightAll() {
29  showHeight("radio_form", "radio_form_size_p");
30  showHeight("button_form", "button_form_size_p");
31  showHeight("scrollbar_p", "scrollbar_form_size_p");
32}
33</script>
34</body>
35</html>