2017-10-12 44 views

回答

1

不要緊是否是潛水或不內:

JS:的document.getElementById( 「名稱」)值= 「約翰·史密斯」;。 jQuery:$(「#name」)。val(「John Smith」);

0

由於您的輸入有一個ID,超級簡單。只需更改值參數。

var my_text_field = document.querySelector('#name'); 
my_text_field.value = "New Value"; 
相關問題