如何显示数组的最新索引? [英] how to show latest index of an array ?

查看:61
本文介绍了如何显示数组的最新索引?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的HTML

This is my html

</head>
<body>
    <div id="outer">
        <div id="header">
        <table>
            <tr>
                <td>Enter your ToDo List</td>
                <td>  <input type="text"  id="target"/><br /></td>
               <td> <input id="Button1"  type="button" value="OK" /></td>
               <!-- <td>
                  </td>-->
            </tr>
        </table>
       </div>
        <div id="message">
            
        </div>
    </div>
</body>
</html>





这是我的javascript





this is my javascript

Office.initialize = function (reason) {
  

    $('#Button1').click(function () {
        $("#message").append("<br />" + "<input type='checkbox' id='checkbox2' name='test1' />" + document.getElementById("target").value) + "<br />";
        
    });
}



这里我的程序接受用户输入并将其写入复选框

现在我想将这些输入放入数组并在顶部显示用户的最新输入



任何人都可以帮助我吗?



谢谢!


here my program takes user input and writes it in a check box
now i want to put those inputs in an array and display the newest input from user at the top

can any one please help me ?

Thank you !

推荐答案

' #Button1').click( function (){
('#Button1').click(function () {


#message)。append( < br /> + < input type ='checkbox'id ='checkbox2'name = 'test1'/> + document .getElementById( target)。value)+ < br />;

});
}
("#message").append("<br />" + "<input type='checkbox' id='checkbox2' name='test1' />" + document.getElementById("target").value) + "<br />"; }); }



这里我的程序接受用户输入并将其写入复选框

现在我想将这些输入放入数组并在顶部显示用户的最新输入



任何人都可以帮助我吗?



谢谢!


here my program takes user input and writes it in a check box
now i want to put those inputs in an array and display the newest input from user at the top

can any one please help me ?

Thank you !


// HTML





//HTML











输入您的待办事项清单





Enter your ToDo List





















// Js

Office.initialize = function(reason){








//Js
Office.initialize = function (reason) {



这篇关于如何显示数组的最新索引?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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