Hi,
try this instead:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<title>www.daniweb.com</title>
<script type="text/javascript">
<!--
var d = document;
window.onload = function() {
var els = ( "testform" in d ) ? d.testform : d.getElementById( "testform" );
var attr = [ "id", "title", "alt" ];
if ( els ) {
els = els["testing"];
var col = "\n";
for ( var i = 0; i < attr.length; i++ ) {
if ( els.getAttribute( attr[ i ] )) {
col += attr[ i ] + " : " + els.getAttribute( attr[ i ] ) + "\n";
continue;
}
} return alert( col );
} alert( "Unsupported script, please update your browser" );
return false
}
// -->
</script>
</head>
<body>
<div>
<form id="testform" name="testform" action="#" onsubmit="return false;">
<div>
<!-- Using ( ALT ) Attribute in a select tag is NOT RECOMMENDED in any of the W3C Standard (x)HTML document templates'.
This document will output 1 error: ( Attribute "ALT" is not a valid attribute ) -
and will not validate, if you will attempt to verify these document with W3C markup validation tool.
-->
<select id="testing" name="testing" alt="test|001" title="test|ddd" size="1">
<option value="alt attribute">ALT Attribute</option>
</select>
</div>
</form>
</div>
</body>
</html>