[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Html help
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 15
Thread images: 1
File: Capture.png (5 KB, 364x166) Image search: [Google]
Capture.png
5 KB, 364x166
I am new to html coding, but how do i take text put in a textbox made like this:
>1st Number : <input type="text"/>

into a variable? say I ran the script and typed in 4, and had the script subtract that variable from another variable. how could i get that user input into a variable into my script?
>>
You can't code with html you have to use Javascript
>>
>>55595622
How do you do that, because I can cross code
>>
>>55595578
Are you a girl or an indian?
>>
>>55595643
neither
>>
>>55595634
You can easily find the solution with Google. Search for jQuery input value.
>>
HTML doesn't have variables because it isn't a programming language, it's a markup language.
You'll need JavaScript.

Start with Codecademy's HTML/CSS/JavaScript courses then pickup a book for them to study further.
>>
>>55595634
Give the element an id attribute and set it to a variable like this in javascript:

var variable = document.getElementById("ElementId");


Or if you're using JQuery:

var variable = $('#ElementId');
>>
>>55595578
You need 'id' to identify which textbooks to read from.
<input type="text" id="cock" />
<script>
var myCock = document.getElementById('cock').value;
</script>
>>
>>55595897
private long myCock;
>>
>>55595859
that doesn't retrieve value, just the Dom element. ".value" should be added at the end
>>
>>55595909
JavaScript doesn't understand long cock.
>>
>>55595930
Let's be honest OP probably thinks java and javascript are the same thing anyways
>>
>>55595918
My bad, this anon is correct. It would be

var bigFuckingThrobbingCock = document.getElementById("ElementId").value;
>>
>>55595578
Honestly if you have problems with HTML, you need to just kill yourself.171
Thread replies: 15
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.