DHTML Events
DHTML Events
<html><head><script type="text/javascript">
function mymessage(){
alert("This message was triggered from the onload event");
</script></head>
<body onload="mymessage()"></body></html>
Using javascript
<script type="text/javascript">
document.write("JavaTpoint");
-------------------------------------------------------------------------------------
JavaScript Events
<button onclick="document.getElementById('demo').innerHTML=Date()">The
time is?</button>
<p id="demo"></p>
-------------------------------------------------------------------------------------
∀ ∀ ∀ ∂ ∂ ∂ ∃ ∃
∃
∅ ∅ &empty ∇ ∇ ∇ ∈ ∈
∈
-------------------------------------------------------------------------------------
<audio controls>
<source src="horse.ogg" type="audio/ogg">
<source src="horse.mp3" type="audio/mpeg">
</audio>
<iframe src="https://www.w3schools.com"></iframe>
Dynamically change style to HTML Documents
<h1 id="h1" style="color:green;">GeeksforGeeks</h1>
<p id="GFG_UP"></p>
<button onclick="gfg_Run()"> Click here </button>
<p id="GFG_DOWN"></p>
<script>var el_up = document.getElementById("GFG_UP");
var el_down = document.getElementById("GFG_DOWN");
var heading = document.getElementById("h1");
el_up.innerHTML = "Click on the button to " + "change the style
attribute";
function gfg_Run() {
heading.style["background-color"] = "green";
heading.style["color"] = "white";
el_down.innerHTML = "Style Attribute Changed"; } </script>
<table>
<tr><th>First_Name</th><th>Last_Name</th><th>Marks</th><
/tr>
<tr><td>Sonoo</td><td>Jaiswal</td><td>60</td></tr>
<tr><td>Chetna</td><td>Singh</td><td>72</td></tr> </table>
First name:
Last name:
Submit
<dl> <dt>Aries</dt>
<dd>-One of the 12 horoscope sign.</dd>
<dt>Oracle</dt>
<dd>-It is a mnc</dd> </dl>
Creating objects in JS
<script> emp={id:102,name:"Shyam Kumar",salary:40000}
document.write(emp.id+" "+emp.name+" "+emp.salary); </script>
OUTPUT: 102 Shyam Kumar 40000
JavaScript Function
<script>
function msg(){
alert("hello! this is message"); } </script>
<input type="button" onclick="msg()" value="call function"/>
ADO.NET Introduction---It is a module of .Net Framework
which is used to establish connection between application and
data sources. Data sources can be such as SQL Server and XML.
ADO.NET consists of classes that can be used to connect,
retrieve, insert and delete data. All the ADO.NET classes
are located into System.Data.dll and integrated with XML classes
located into System.Xml.dll. ADO is a Microsoft technology.ADO
stands for ActiveX Data Objects. ADO is a Microsoft Active-X
component. ADO is automatically installed with Microsoft IIS.ADO
is a programming interface to access data in a database
o Its simplest and main feature is that we can create the web
page dynamically.
o Dynamic Style is a feature, that allows the users to alter the
font, size, color, and content of a web page.
o It provides the facility for using the events, methods, and
properties. And, also provides the feature of code reusability.
o It also provides the feature in browsers for data binding.
o Using DHTML, users can easily create dynamic fonts for
their web sites or web pages.
o With the help of DHTML, users can easily change the tags
and their properties.
o The web page functionality is enhanced because the
DHTML uses low-bandwidth effect.
The Document Object Model (DOM) is a programming
interface for HTML(HyperText Markup
Language) and XML(Extensible markup language) documents.
It defines the logical structure of documents and the way a
document is accessed and manipulated.
Note: It is called a Logical structure because DOM doesn’t
specify any relationship between objects.
DOM is a way to represent the webpage in a structured
hierarchical way so that it will become easier for programmers
and users to glide through the document. With DOM, so
basically Document Object Model is an API that represents
and interacts with HTML or XML documents.