通过表单输入添加动态用户列表 [英] adding dynamic user list through form input

查看:103
本文介绍了通过表单输入添加动态用户列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<!doctype html>

尝试使用javascript通过表单输入添加无序列表用户



请指教



< form>

用户名:< input type =textname =usernameplaceholder =name>

电子邮件:< input type =emailname =emailplaceholder =me@example.com>

< button> adduser< / button>

< / form>

用户:





< html>

-想要使用提交添加你的列表使用javascript

解决方案

< html xmlns =http://www.w3.org/1999/xhtml >

< head>

< title>< / title>

< script src =http:// code .jquery.com / jquery-1.11.0.min.js>< / script>

< script type =text / javascript>



var element = null;

var container = null;



函数Populateusers()

{


(#UsersList)。append(''+


('#name')。 val()+' +

<!doctype html>
trying to add unorder list users through form input using javascript

please advise

<form>
User Name:<input type="text" name="username" placeholder="name">
Email :<input type="email" name="email" placeholder="me@example.com">
<button>adduser</button>
</form>

USERS:



    <html>
    -would like to add uer list using submit using javascript

    解决方案

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title></title>
    <script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
    <script type="text/javascript">

    var element = null;
    var container = null;

    function Populateusers()
    {


    ("#UsersList").append('' +


    ('#name').val() + ' ' +


    这篇关于通过表单输入添加动态用户列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆