我想將在/ index頁面(屬性地址)和(email)上輸入的文本數據傳遞到/註冊頁面。如何初始化HTML頁面中的元素
問題:
查詢字符串(S)正在進入的網址,但我怎麼填充相應字段/註冊頁面上,在URL中提供的文本數據?
www.juwai.kiwi
<script>
(function(f, e, t){
initForm(f, e, t);
}(document.forms[0],'full_name',document.getElementsByName('full_name').valueOf()));
</script>
<script>
function initForm(oForm, element_name, init_txt) {
frmElement = oForm.elements[element_name];
frmElement.value = init_txt;
};
var queryStrng = [
{
full_name: "dave",
email: "[email protected]",
property_address: "prop address to do"
}
];
//queryStrng[0].full_name = document.getElementsByName("full_name").valueOf();
//var oFormObject = document.forms[0];
</script>
你的問題需要更具體的,如果你要得到一個有用的答案。 –
對不起,正在編輯過程中。現在做了羅布。 –