0% found this document useful (0 votes)
48 views12 pages

HTML Notepad Internet Explorer

The document discusses using JavaScript and HTML to dynamically display and manipulate content in a web page. It includes examples of using JavaScript to write text and HTML tags to the document, retrieve and set element properties, handle events, validate user input, and use timers to periodically execute functions. Functions are demonstrated to encapsulate repetitive code and parameters are used to make functions more flexible.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views12 pages

HTML Notepad Internet Explorer

The document discusses using JavaScript and HTML to dynamically display and manipulate content in a web page. It includes examples of using JavaScript to write text and HTML tags to the document, retrieve and set element properties, handle events, validate user input, and use timers to periodically execute functions. Functions are demonstrated to encapsulate repetitive code and parameters are used to make functions more flexible.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

NotePad HTML

Internet Explorer

Allow Blocked Contents


head html

C++
script text/jscript text/php text/vbscript (;) for if
text/tcl text/livescript text/javascript

<script type="text/javascript">
document.write(" ");
document.write("<h1 align='center'> </h1>");
alert(" ");
alert("<h1>reza</h1>"); alert
</script>

Internet
Explorer
html
write document
HTML DOCTYPE C++

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0


Transitional//EN"
http://www.w3.org/TR/xhtml1/DTD/xhtml1=transitional.dtd>
<html xmlns="http://www.w3.org/1999/xhtml>
<head>
<meta http-equiv=Content-Type content="text/html;
charset=windows-1256">
<title>Iran</title>
<script type="text/javascript">
document.write( "iran");
document.write( "tehran");
document.write( "<br />");
document.write( "iran<br />");
document.write( "tehran<br />");
document.write( "iran" + "<br />" + "tehran<br />" );
document.write( "4" + "<br />");
document.write( 4 + "<br />");
document.write( "4" + "5" + "<br />");
document.write( "4" + 5 + "<br />");
document.write( 4 + 5 + "<br />"); var
var x=114;
document.write( "x" + "<br />");
document.write( x + "<br />");
int
if(x= =114) float
document.write("Yes<br />");
else
document.write("No<br />");

for(var c=1;c<=5;c++)
{
document.write( c + " <br />");
}
</script>
</head>
<body>

</body>

javascript

java script
<script>
var w="Test1";
document.write("Set w.<br />");
</script>

HTML between Script <br />

<script>
document.write("w = " + w);
</script>

<script>
document.write(
"<h1>"+
"You can type multi line."+
"</h1>"
);
</script>

a=parseint(b);
a=parsefloat(b);

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


http://www.w3.org/TR/xhtml1/DTD/xhtml1=transitional.dtd>
<html xmlns="http://www.w3.org/1999/xhtml>
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1256">
<title>Iran</title>
<script type="text/javascript" src="test.js"></script>
</head>

<body>
View Source
</body>
js

var x=new Array();


x[0]="reza";
x[1]="ali";
x[3]="mina";
x[4]="hadi";
document.write("<table border='1' bgcolor='#A7F3FC' align='center'>");
for(var c=1;c<=5;c++)
document.write( "<tr>" +
" <td>" + c +"</td>" +
" <td>Ali Ahmady</td>" +
" <td>" + x[c-1] + "</td>" +
"</tr>");
document.write( "</table>");

Var a=new array;


A=[6,8,2,5,6] ;
document.write("aaaaaaa<br />");
alert("Hello");

if (confirm(" "))
document.write(" .<br />");
else
document.write(" .<br />");

var a=prompt(" " );


document.write(a + "<br />");

var n=prompt(" ","" );


for(var c=1;c<=n;c++)
if(n%c==0) document.write(c + "<br />");

<script type="text/javascript">
var r=prompt(" " );
var c=prompt(" " );
document.write("<table border='1'>");
for(var ii=1;ii<=r;ii++)
{
document.write("<tr>");
for(var i=1;i<=c;i++) document.write("<td> *** </td>");
document.write("</tr>");
}
document.write("</table>");
</script>

<script>
function test(x)
{
alert(x*x);
}
var y=4;
test(y);
test(3);
</script>

<script>
function test(x)
{
return x*x;
}
var a;
a=test(3);
alert(a);
</script>

<script>
function test(x)
{
var x=4;
alert(y);
}
var y=3;
alert(x);
</script>

<script>
function test(x,y)
{
return 2*(x+y);
}
var a,b;
a=prompt("Enter Width","3");
a=parseInt(a);
b=prompt("Enter Height","5");
b=parseInt(b);
alert(test(a,b));
</script>

iran
function table(n,m)
{
document.write("<table border='1px'>");
for(var c=1;c<=n;c++)
{
document.write("<tr>");
for(var cc=1;cc<=m;cc++)
document.write("<td>ali</td>");
document.write("</tr>");
}
document.write("</table>");
}

table(4,5);
table(2,3);
table(7,4);

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


http://www.w3.org/TR/xhtml1/DTD/xhtml1=transitional.dtd>

<html xmlns="http://www.w3.org/1999/xhtml>

<head>
<meta http-equiv=Content-Type content="text/html;
charset=windows-1256">
<title>Iran</title>
<script type="text/javascript" >
function test1()
{
alert("salam");
}
</script>
</head>

<body onUnLoad="test1()">
<h1 align="center" onClick="test1()">IRAN</h1>
<h1 align="center" onMouseOver="test1()">Tehran</h1>
<h1 align="center" onMouseOut="test1()">Tbriz</h1>
<input onChange="test1()" />
<input />

</body>

</html>

onMouseDown
onMouseUp
onfocus
onblure
<input type="button" onMouseDown="
alert(333);
var x=114;
alert(x);
">

<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1=


transitional.dtd>
<html xmlns="http://www.w3.org/1999/xhtml>
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1256">
<title>Iran</title>
<script type="text/javascript">
function Zarb() {
t3.value=t1.value * t2.value;
}

function Check() {
if (t1.value=="" || t2.value=="" ) alert(" ");
}

function TClear() {
t1.value=""; t2.value=""; t3.value="";
}
</script>
</head>

<body >
<input type="text" name="t1" /> x
<input type="text" name="t2" />
<input type="button" value=" = " name="cmdZarb" onclick="Zarb();" onMouseOver="Check();"/>
<input type="text" name="t3" />
<input type="button" value=" C " name="cmdClear" onclick="TClear();" />
</body>

Window.open("test.html","_self")
x.length
< div id="a1" style="position:absolute;"> iran< / div>

<script>
document.getElementById("a1").style.backgroundColor="red";
document.getElementById("a1").style.top= 300+"px";
document.getElementById("a1").style.left= 300+"px";
</script>

<head>
<script type="text/javascript" language="JavaScript">
function test1 () {
document.write(" <br/>");
}
function test2 () {
document.getElementById('javab').innerHTML=" <br/>";
}
</script>
</head>
<body dir="rtl">
<form method="post" action="test.php">
<input type="button" value=" " onclick="test1();">
<input type="button" value=" " onclick="test2();">
<input type="submit" value=" " onclick="test2();">
<br /><b id="javab" style="color: red;"></b>
</form>
</body>

<body dir="rtl">
<form id="form1" method="post">

<input type="text" onkeypress="return true">


<input type="text" onkeypress="return false">
</form>
</body>
<head>
<script type="text/javascript" language="JavaScript">
function test(x)
{
document.getElementById('aaa').innerHTML=x.keyCode;
return false;
}
</script>
</head>

<body dir="rtl">
<form id="form1" method="post">

<input type="text" onkeypress="return test(event)">


<b style="color: red;" id="aaa"></b>
</form>
</body>

<head>
<script type="text/javascript" language="JavaScript">
function isNumberKey(evt)
{
if (evt.keyCode < 48 || evt.keyCode > 57)
{
document.getElementById('jn').innerHTML=" ";
return false;
}
else
{
document.getElementById('jn').innerHTML="";
return true;
}
}

</script>
</head>

<body dir="rtl">
<form id="form1" method="post">

<input type="text" onkeypress="return isNumberKey(event)">


<b style="color: red;" id="jn"></b>
</form>
</body>

setTimeout("----",5000)
setInterval("----",5000)

<body>
<input type="hidden" name="x" />
<div id="y"></div>
</body>

<script>
x.value=-1;
function pic()
{
//x.value=++x.value%3;
if (++x.value==3) x.value=0;
document.getElementById('y').innerHTML='<img src="'+x.value+'.jpg" width="200" />';
}
setInterval("pic()",1000)
</script>

<a href="aaa.html"
onMouseOver="document.clock.src='art_deco_clock_black.png'"
onMouseOut= "document.clock.src='art_deco_clock_blue.png' " >

</a>
<img src="D:\ art_deco_clock_blue.png" name="clock" />

<p name="p1" onclick="window.frm1.text1.value='oooo';">


sample
</p>
p1.innertext
p1.innerhtml
document.location="---"

document.URL="---"

jquery
jquery.com
<head>
<SCRIPT type=text/javascript src="jquery-1.8.3.min.js"></SCRIPT>
<script type="text/javascript">
$(document).ready(function()
{
$('h1').click(function()
{
$(this).fadeOut();
});
});
</script>
<head>
<body>
<h1>iran</h1>
</body>
This document was created with Win2PDF available at http://www.daneprairie.com.
The unregistered version of Win2PDF is for evaluation or non-commercial use only.

You might also like