开发者

get html form elements after submit

In a HTML form, After clicking submit button, html elements present in the for开发者_StackOverflowm can convert into html for example if form contains two elements

       Name : textbox value 10
       password: textbox value xx
       button  : submit

after i submit i want o/p as

<input type="text" value="10" />
<input type="text" value="xx" />
<input type="button" value="submit"/>

using java or js


Well, according to comments, you need server side (for example PHP) for this. The posted values have to be directed back to the page, like this:

<form action="" method="post">
    Name: <input type="text" name="name" value="<?php echo $_POST['name']>" /><br />
    Password: <input type="text" name="pass" value="<?php echo $_POST['pass']>" /><br />
    <input type="button" value="submit" />
</form>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜