Jump to content

Textboxes.


prudens

Recommended Posts

alert(document.getElementById['form1'].l_text.value);
alert(document.getElementById['l_text'].value);

 

None of those work! (I'm developing on Facebook platform... I think they disabled .value property...)

 

 

But I really need to get the value of the textbox by clicking a button...

Link to comment
https://forums.phpfreaks.com/topic/109825-textboxes/#findComment-563639
Share on other sites


<form  action="" method="post">
<input type="text" name="test" id="test" />
<input type="button" name="button" value="button" onclick="getvalue()" />
</form>

<script type="text/javascript">
function getvalue()
{
alert(document.getElementById('test').value);
$value=document.getElementById('test').value;
}
</script>

Link to comment
https://forums.phpfreaks.com/topic/109825-textboxes/#findComment-563805
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.