我需要一个简单的java脚本或html代码来实现简单的库存 [英] I need a simple java script or html code for simple inventory

查看:121
本文介绍了我需要一个简单的java脚本或html代码来实现简单的库存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!



我正在尝试设计一个简单的页面,它将显示可用的用户名列表,即使已经采用也可以抓取。我在这里想要实现的是当有人抓住其中一个用户名时,该按钮将变为红色,并且还将更新文本区域输入中标记为使用者的第三列单元格中的名称。



以下是我的基本HTML代码:



Hi All!

I am trying to design a simple page that will show the list of usernames that are available and can be grab even if its taken already. What I am trying to achieve here is when someone grab one of the usernames, the button will turn red and will also update the name in third column cell labeled "Used By" from the text area input.

Below is my basic html code:

<table class="tftable" border="1">

  <tr bgcolor="yellow">
<td>User Name List</td><td> Status </td> <td>Used By</td>
 </tr>
  <tr>
 <td>User1 </td><td bgcolor="green"> </td><table><tbody><tr><td>Available</td></tr></tbody></table>
  </tr>

 <tr>
 <td>User2 </td><td bgcolor="green"> </td><table><tbody><tr><td>Available</td></tr></tbody></table>
 </tr>

 <tr>
 <td>User3 </td><td bgcolor="red"> </td><td>Troy</td>
 </tr>

 <tr>
 <td>User4 </td><td bgcolor="green"> </td><table><tbody><tr><td>Available</td></tr></tbody></table>
 </tr>

 <tr>
 <td>User5</td><td bgcolor="red"> </td><td>John</td>
 </tr>

 <tr>
 <td>User6<td bgcolor="green"> </td><table><tbody><tr><td>Available</td></tr></tbody></table>
 </td></tr>

 <tr>
 <td>User7 </td><td bgcolor="red"> </td><table><tbody><tr><td>Available</td></tr></tbody></table>
 </tr>

 <br>
 </br></table>
 <form>
 <select name="userlist">
 <option value="User1">User1</option>
 <option value="User2">User2</option>
 <option value="User3">User3</option>
 <option value="User4">User4</option>
 <option value="User5">User5</option>
 <option value="User6">User6</option>
 <option value="User7">User7</option>
 </select>
 <br>
 <form method="post">
 <textarea cols="20" rows="1">Type your name here</textarea>
 <br>
 <input type="button" value="Grab">
 <input type="reset" value="Reset" >
 </form>





希望有人可以创建一个简单的脚本/代码供我更新到我的网站,因为我的网站没有这个创作者。



提前谢谢。



Hope that somebody can create a simple script/code for me to update to my website as this is not available in my website creator.

Thanks in advance.

推荐答案

当然。我们很多人可以创造这样的事情。但没有人会。让我们看看为什么:

0)没有java脚本这样的东西,只是Javascript - 这与java没什么关系。

1)你不能使用Javascript制作任何GUI。即使您没有向页面添加任何静态HTML标记,您仍然需要HTML。所以OR没有任何意义。

2)一般来说,你不能只使用Javascript和HTML制作这样的库存。因为您在关闭浏览器后会立即丢失所有数据。所以你需要一些存储。

3)我写了一般,因为在HTML5中你有 locladb [ ^ ]。但由于它是本地的,在一个客户端上输入的数据仍然在该客户端上。所以你不能用这种方式制作任何多用户应用程序。

4)当你需要将数据上传到服务器时,你需要一个服务器,一个存储器(就像数据库服务器应用程序一样)具有适当模式的数据库)和服务器端自定义应用程序,它处理客户端和存储之间的接口 - 以及许多其他事情。 网站创建者很少适合这样的事情。你需要编码!

5)至少你可以告诉我们你的网站hothing服务器有什么功能,比如:你有什么数据库引擎,你可以在那里运行什么样的应用程序( PHP,ASP,ASP.NET,Python,Ruby,NodeJS,...)以及开发服务器端所需的许多其他东西。



所以,你要求的不能不成功。但即使它可能,也没有人会在这里,因为这里的事情并不像这样。如果您寻求帮助,我们愿意提供帮助 - 但您希望有人做您的工作。好吧,我们宁愿不会...
Sure. Many of us can create such thing. But none will. Let's see why:
0) There is no such thing as "java script", just Javascript — which has little to do with java.
1) You can't make any GUI just with Javascript. Even if you don't add any static HTML markrup to your page, you still need HTML. So "OR" mаkеs no sense.
2) In general you can't make such an inventory just with Javascript and HTML. Since you would loose any data you enter as soon as you close your browser. So you need some storage.
3) I wrote "in general" since in HTML5 you have locladb[^]. But as it is local, the data entered on one client remains on that client. So you can't make any multi-user application this way.
4) And as soon as you need to upload data to a server, you need a server, a storage (like database server application with a database having a proper schema) and a server side custom application that handles anything about interfacing between the client and the storage - and many other things. A "website creator" is rarely suitable for such thing. You need to code!
5) At least you could have told us what are the capabilities of your website hothing server, like: what database engine you have there, what kind pf application can you run there (PHP, ASP, ASP.NET, Python, Ruby, NodeJS,…) and many other things needed to develop the server side.

So, what you requested can not't be made. But even if it could be, no one would here, because things don't work like this here. We are willing to help if you ask for help — but you want somebody to do your work. Well, we rather won't…


我让我自学java,似乎我得到了我需要的东西。



谢谢大家!
I have let my self study java and seems I got what I need.

Thanks everyone!


这篇关于我需要一个简单的java脚本或html代码来实现简单的库存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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