我有以下URL:http://localhost:8888/datatest?username=JD042719
我想拉动"JD042719"
。 此问题不需要'获取'请求。 然后,应将用户名值设置为另一个文本框的值。也许是这样的:从网址拉取变量并将其设置为文本框的值
HTML
<label for="Assoc">Associate ID</label>
<input type="text" name="AssocID" id="AssocID" required="required">
的JavaScript
$(function associd(){
document.getElementById("AssocID").value=username;
});
看看javascript的HTTP GET函数。 HTTP://计算器。com/questions/247483/http-get-request-in-javascript – Spade