I shoul want to know the content o a certain span:
*************** *************** *************** *************** ************
<html>
<head>
<title>Document o senza titolo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<script type="text/javascript">
function return_span_val ue(){
var s = document.getEle mentById("x");
alert(x.nodeNam e);
alert(x.nodeVal ue);
}
</script>
<body>
<span id="x">Hello world!</span>
<input type="button" value="Click to know span value"
onClick="return _span_value();" >
</body>
</html>
*************** *************** *************** *************** ************
It should return "Hello world!" doesn't it?
Any help appreciated.
Regards.
--
Fabri
(Non è tuttu oru chiddu chi stralluci, né tuttu veru chiddu ca si dici)
*************** *************** *************** *************** ************
<html>
<head>
<title>Document o senza titolo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<script type="text/javascript">
function return_span_val ue(){
var s = document.getEle mentById("x");
alert(x.nodeNam e);
alert(x.nodeVal ue);
}
</script>
<body>
<span id="x">Hello world!</span>
<input type="button" value="Click to know span value"
onClick="return _span_value();" >
</body>
</html>
*************** *************** *************** *************** ************
It should return "Hello world!" doesn't it?
Any help appreciated.
Regards.
--
Fabri
(Non è tuttu oru chiddu chi stralluci, né tuttu veru chiddu ca si dici)
Comment