jlindley (owner)

Revisions

  • 541de6 jlindley Thu May 21 08:27:21 -0700 2009
gist: 115522 Download_button fork
public
Public Clone URL: git://gist.github.com/115522.git
Embed All Files: show embed
get_elements_by_name.html #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<html>
 
<head>
<script type="text/javascript">
    
    function is_it_private(){
        var is_private_element = document.getElementsByName("is_private")[0];
        alert("Value is " + is_private_element.checked );
    }
    
    window.onload = is_it_private;
    
</script>
</head>
<body>
 
<form >
 
    <p>
    <label>Private?</label>
    <input name="is_private" type="checkbox" />
    </p>
 
</form>
</body>
 
</html>