Loading
View RSS Feed

indies

Showing Use Of Checkbox In JavaScript

Rate this Entry
Name:  javascript.jpg
Views: 700
Size:  10.6 KB

Code:
<html>
    <head>
    <script type="text/javascript">
    var f,count,i;
    function check(f)
    {
        txt=" ";
        count=document.forms[0].language;

        for(i=0;i<count.length;i++)
            if(count[i].checked)
                txt+=count[i].value+"   ";

        document.forms[0].select.value=txt;
    }
    </script>
    </head>

    <body bgcolor="yellow">
    <form name=f1>
        <center>
            <input type=checkbox name="language" value=.net>.NET<br>
            <input type=checkbox name="language" value=java>JAVA<br>
            <input type=checkbox name="language" value=c++>C++<br>
            <input type=checkbox name="language" value=sql>SQL<br>
            <input type=checkbox name="language" value=j2ee>J2EE<br>
        
            <input type=button value=GET onClick=check(this.form)><br>
            <h3>You have selected:</h3>
            <input type=text name=select size=100>
        </center>
    </form>        
    </body>

Submit "Showing Use Of Checkbox In JavaScript" to Digg Submit "Showing Use Of Checkbox In JavaScript" to del.icio.us Submit "Showing Use Of Checkbox In JavaScript" to StumbleUpon Submit "Showing Use Of Checkbox In JavaScript" to Google

Updated 02-26-2011 at 05:00 AM by Harsh

Categories
Web Design

Comments

  1. angad's Avatar
    impressive. with addition of a picture thsi blog is really looking good and ya contents is also good.



Disclaimer: Users of techforum4u.com are responsible for ensuring that any material they post (article, blog posts, images or other mulitimedia content) does not violate or infringe upon the copyright, patent, trademark, or any personal or proprietary rights of any third party, and is posted with the permission of the owner of such rights.Anyone who violates these rules may have their access privileges removed without warning.