Foren
Neue Beiträge
Foren durchsuchen
Was ist neu?
Neue Beiträge
Profilnachrichten
Online
Anmelden
Registrieren
Aktuelles
Suche
Suche
Nur Titel durchsuchen
Von:
Neue Beiträge
Foren durchsuchen
Menü
Anmelden
Registrieren
App installieren
Installieren
Programmierung
HTML
Problem with binding JavaScript data.
JavaScript ist deaktiviert. Für eine bessere Darstellung aktiviere bitte JavaScript in deinem Browser, bevor du fortfährst.
Du verwendest einen veralteten Browser. Es ist möglich, dass diese oder andere Websites nicht korrekt angezeigt werden.
Du solltest ein Upgrade durchführen oder einen
alternativen Browser
verwenden.
Auf Thema antworten
Beitrag
[QUOTE="user12, post: 11916, member: 3481"] when ever i try to bind my javaScript code to my html code content from my page is missing that happing when i bind my javaScript cod in the top of my html code , but if i bind it on the bottom before the 2 line of my html code i get no error and every things works just fine, but i dont want that bc it is bad practice! can anyone tell me where is the problem, and why binding my html code in the top is probmle which what should be the right way to do it. <!DOCTYPE html> <html> <!-- Rui Santos - Complete project details at [URL]https://RandomNerdTutorials.com[/URL] Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files. The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. --> <head> <meta name="viewport" content="width=device-width, initial-scale=1" /> <script src="[URL]https://code.highcharts.com/highcharts.js[/URL]"></script> <script type='text/javascript' src="app.js"></script> <link rel="stylesheet" href="style.css" /> </head> <body onload="set_ButtonState()"> <div class="div__p__motor"> Motor Status</div> <div class="motor_pos__div"> <div class="motor__div"> <h3>Aus / AN <span id="outputState"></span></h3> <label class="switch"> <input type="checkbox" name="motor_on_off" onchange="toggleCheckbox(this)" id="motor_on_off" " + outputStateValue + "> <span class="slider"></span> </label> </div> <div class="interval__div"> <h3>Interval <span id="outputState"></span></h3> <label class="switch"> <input type="checkbox" name="motor_mix" onchange="toggleCheckbox(this)" id="motor_interval" " + outputStateValue + "> <span class="slider"> </span> </label> </div> <div class="mix__div"> <h3>Mix<span id="outputState"></span></h3> <label class="switch"> <input type="checkbox" onchange="toggleCheckbox(this)" id="motor_mix" " + outputStateValue + "> <span class="slider"> </span> </label> </div> </div> <div class="temp__sttings"> <input class="temp__slider" type="range" id="myRange" value="20" onchange="myFunction(this.value)" /> <div class="temperature__p"> Motor = </div> <div class="temp__slider__p" id="demo"> 1</p></div> </div> <div class="div__p__temprature">Temprature</div> <div class="temp__div"> <div class="mix__div"> <h3>AN/AUS<span id="outputState"></span></h3> <label class="switch"> <input type="checkbox" onchange="toggleCheckbox(this)" id="output_temp" " + outputStateValue + "> <span class="slider"> </span> </label> </div> </div> <div class="temp__sttings"> <input class="temp__slider" type="range" id="myRange2" value="20" onchange="myFunction2(this.value)" /> <div class="temperature__p"> ℃ </div> <div class="temp__slider__p" id="demo2"> 1</p></div> </div> <!--- Diagramm--> <div id="chart-temperature" class="container"></div> <div id="chart-Motor" class="container"></div> <!-- <div id="chart-pressure" class="container"></div> --> </body> </html> [/QUOTE]
Zitate
Authentifizierung
Antworten
Programmierung
HTML
Problem with binding JavaScript data.
Oben
Unten