Forum'da ara:
Ara


Yazar Mesaj
Mesaj09.01.2012, 11:03 (UTC)    
Mesaj konusu: Yazılarda Açıklama Kodu

Test Edilmiştir. Çalışmaktadır resimde de görüldüğü gibi..
Görünüm:

Kod:
<script type="text/javascript">
/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Fang | http://www.webdeveloper.com/forum/showpost.php?p=820426&postcount=2 */
function showHide(parent) {
var aDD=parent.getElementsByTagName('dd');
for(var dd=0; dd<aDD.length; dd++) {
aDD[dd].style.display=(aDD[dd].style.display=='none')? 'block' : 'none';
}
}

// Multiple onload function created by: Simon Willison
// http://simonwillison.net/2004/May/26/addLoadEvent/
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
} else {
window.onload = function() {
if (oldonload) {
oldonload();
}
func();
}
}
}

addLoadEvent(function() {
var aDT=document.getElementsByTagName('dt');
for(var i=0; i<aDT.length; i++) {
aDT[i].onmouseover=aDT[i].onmouseout=Function ('showHide(this.parentNode)');
showHide(aDT[i].parentNode);
}
});
</script>

<style>
dt {
font-weight:bold;
}
</style>


<div style="width: 50%; margin-left: 5%;">
<dl>
<dt><a href="http://www.w3.org/">The World Wide Web Consortium</a></dt>
<dd>Develops interoperable technologies (<em>specifications</em>, <em>guidelines</em>, <em>software</em>, and <em>tools</em>) to lead the Web to its full potential.</dd>
</dl>
<dl>
<dt><a href="http://en.wikipedia.org/wiki/Unobtrusive_JavaScript">Unobtrusive JavaScript</a></dt>
<dd>The separation of JavaScript functionality (the "behavior layer") from a Web page's structure/content and presentation layers</dd>
</dl>
<dl>
<dt>Unrelated stuff (no link)</dt>
<dd>Ma quande lingues coalesce, li grammatica del resultant lingue es plu simplic e regulari quam ti del coalescent lingues. Li nov lingua franca va esser plu simplic e regulari quam li existent Europan lingues. It va esser tam simplic quam Occidental.</dd>
</dl>
</div>
Önceki mesajları göster:   


Powered by phpBB © 2001, 2005 phpBB Group
Türkçe Çeviri: phpBB Türkiye & Erdem Çorapçıoğlu