Code:
<html>
<head>
<script language="javascript" >
function smanPromptList(objInputId){//I cut my file //short to find where is wrong.
var objInputCel = document.getElementById(objInputId).rows[0].cells[1];
var objInput = objInputCel.childNodes[0];
document.write(objInputCel.innerText);//I tried //this wondering if it will display"apple",but it didn't.
}
</script>
</head>
<body onload="smanPromptList('tb1')" bgcolor="#ffffff">
<table id="tb1" width="100%" border="0" cellspacing="3%" cellpadding="3%">
<tr>
<td id="td0" name="td0" width="300">
<form id="form0" name="form0" method="post" action="">
pv:<input type="text" name="htmlText" id="htmlText"/>
</form>
</td>
<td width="300">
apple
</td>
</tr>
</table>
<script language="javascript" >
document.getElementById('htmlText').value = "";
</script>
</body>
Comment