As the title says I'm trying to basically added the numbers 0-9 to a text box and also be able to delete the last input number(basically last digit in textbox or decrease length of data by 1 or w/e to produce this).如何值.append使用<a onclick and then also delete last value added (values = 0-9)
Like you can see below I've setup basically a keypad of buttons which I'm trying to record the value of each to a specific textbox.
<%: Html.TextBox("TBBlah") %>
<a onclick="$('#TBBlah').append('7');" class="large button" style="color:Black; text-decoration:none;">7</a>
<a onclick="$('#TBBlah').append('8');" class="large button" style="color:Black; text-decoration:none;">8</a>
<a onclick="$('#TBBlah').append('9');" class="large button" style="color:Black; text-decoration:none;">9</a>
I'm trying to set this up in this precise way to allow users to enter a code via a touchscreen.
With the code above it says Object doesn't support this property or method which has me wondering what I did wrong.
also was wondering in case this would help (these are in my site.master file)
<!-- jQuery -->
<script src="<%= Url.Content("~/scripts/jquery-1.6.2.js") %>" type="text/javascript"></script>
<script src="<%= Url.Content("~/scripts/jquery-1.6.2.min.js") %>" type="text/javascript"></script>
<!-- /jQuery-->
<!-- jQuery UI -->
<script src="<%= Url.Content("~/content/script/jquery-ui-1.8.16.custom.min.js") %>" type="text/javascript"></script>
<link href="<%= Url.Content("~/content/css/cupertino/jquery-ui-1.8.16.custom.css") %>" rel="stylesheet" type="text/css" media="screen" />
<!-- /jQuery UI -->
I hope I haven't missed out anything but if I have ask and I shall provide.
快一點,你不需要兩個jQuery的腳本。你只需要一個。沒有min的是未壓縮的代碼或者開發代碼,min是壓縮代碼。 – NebulaFox
現在刪除了最小版本,但任何想法,我會如何去刪除一個數字,我會添加1? (通過這個,我只是表示希望它會在onclick事件中) – Myzifer