Give me equivalent javascript and html code

Mohammed - Nov 9, 2009 at 02:27 AM
 Bapi - May 3, 2010 at 08:13 AM
please,give me equivalent javascript and simple html code of php code for showing browser element value

let 'T2' is a variable

$_GET['T2']=? simple Html and javascript code
$_POST['T2']=? simple Html and javascript code


1 reply

your question is clear. php is a sever side language and JavaScript is a client Side language. JavaScript can't work like php. What ever if you asking how to receive values at server side form client side using JavaScript, the answer is JavaScript is not able to do it. If your question is how to call post and get method using html and JavaScript, my answer will be...

let us consider a form...

<script type="text/javaScript">
function abc()
<form name="xyz" id="abc" method="post" action="">
<input type="text" id="sss">
<input type="button" onclick="abc()">

You can use "get" in place of "post".
I thing you can understand.
For more assistance please ask here...