mona11
جمعه 09 اردیبهشت 1390, 11:47 صبح
سلام.این کد من چرا چیزی نشون نمیده.
<html>
<head>
<script language="javascript">
function display_greeting()
{
var a = document.createElement("a").
// Set the URL to visit to Google's web site
a.setAttribute("href","http://google.com/");
// Add the inner text, giving the user something to click
a.appendChild( document.createTextNode( "Visit Google!" ) );
// Add the link at the end of the document
document.body.appendChild( a );
}
</script>
</head>
<body onload="display_greeting()">
<div>salam</div>
<ul>
<li>salam</li>
</ul>
</body>
</html>
<html>
<head>
<script language="javascript">
function display_greeting()
{
var a = document.createElement("a").
// Set the URL to visit to Google's web site
a.setAttribute("href","http://google.com/");
// Add the inner text, giving the user something to click
a.appendChild( document.createTextNode( "Visit Google!" ) );
// Add the link at the end of the document
document.body.appendChild( a );
}
</script>
</head>
<body onload="display_greeting()">
<div>salam</div>
<ul>
<li>salam</li>
</ul>
</body>
</html>