View Single Post
ישן 26-06-06, 20:41   # 2
Distortion
חבר חדש
 
מיני פרופיל
תאריך הצטרפות: Oct 2005
גיל: 37
הודעות: 40

Distortion לא מחובר  

ציטוט:
נכתב במקור על ידי bigsmoke
שלום,
רציתי לדעת איך אפשר לעשות משהו כזה בערך:
יש 2 RAIDO BOTTOM ויש מתחתיהם 2 INPUT BOTTOM
אם לוחצים על הכפתור רדיו הראשון הוא חוסם את הINPUT השני ואם לוחצים על הכפתור רדיו השני הוא חוסם את הINPUT הראשון...
חוסם: לא מאפשר כתיבה בתוכו..

תודה
משהו כזה:
HTML קוד:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-8-i" />
<title>Untitled Document</title>
<script type="text/javascript">
    function disableInput(x)
        {
        if(x==1)
            {
            document.getElementById("input2").disabled=true;
            document.getElementById("input1").disabled=false;
            }
                else
                    {
                    document.getElementById("input1").disabled=true;
                    document.getElementById("input2").disabled=false;
                    }
        }
</script>
</head>
<body>
<form id="bla" method="post" action="">
    <div><input type="radio" name="rButton" value="1" onclick="disableInput(1);" /> 1</div>
    <div><input type="radio" name="rButton" value="2" onclick="disableInput(2);" /> 2</div>
    <div><input type="text" id="input1" name="1" /></div><div><input type="text" id="input2" name="2" /></div>
</form>
  <p>
    <a href="http://validator.w3.org/check?uri=referer"><img
        src="http://www.w3.org/Icons/valid-xhtml10"
        alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
  </p>
</body>
</html>
  Reply With Quote