🎉 Birthdays Hehe First Ever Gumagana na html ko

Status
Not open for further replies.

tsu wo

Eternal Poster
Hehe maybe maliit lang to pero sobrang saya ko neto.


<html>
<body>
<p>All has LDF<input type="checkbox"/><br>
Is it Polar Bond?<input type="checkbox" id="polar"/><br>
Does it have Hydrogen bonded with;Flourine;Oxygen;Nitrogen?<input type="checkbox" id="hydro" /><br>
<button id="button" onclick="check()" >Test</button></p>


<script>






function check(){

var a = "It does not have dipole-dipole intermolecular forces" ;
var b = " have a hydrogen bonding" ;
var c = ".It does not" ;


var polar = document.getElementById("polar"); //get polar
var hydro = document.getElementById("hydro"); //get hydro

if (hydro.checked == false && polar.checked == false){ alert("It only has a London Dispersion Force.") }
else{

if (polar.checked == true){
var a = "It has a dipole-dipole intermolecular forces" }; //if polar is checked, change "a" to it has
if (hydro.checked == true){
var b = " hydrogen bonding" } ;
if (a == "It does not have dipole-dipole intermolecular forces"){
var c = " but it has a"} ;
if (a == "It has a dipole-dipole intermolecular forces"){
var c = ". Also it has a" } ;

alert(a+c+b+" and all has London Despersion Force.");
};
};




</script>


Btw beginner pa ako and di ko kinopya ang mga codes para makagawa.

1647012240544.png
 
Status
Not open for further replies.

About this Thread

  • 0
    Replies
  • 298
    Views
  • 1
    Participants
Last reply from:
tsu wo

Online now

Members online
979
Guests online
847
Total visitors
1,826

Forum statistics

Threads
2,276,258
Posts
28,968,746
Members
1,231,191
Latest member
yonam
Back
Top