Skip to content
Justice Tech School

text, html and val

text reads text, html reads markup and val reads form values.

Example
var t = $("#a").text();
var h = $("#a").html();
var v = $("#name").val();
$("#a").text("new");
$("#a").html("<b>bold</b>");

Exercise

Read input value.

$("#n").()

Quiz Test

Which method reads an input?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.