主要是测试用js代码function getData(){ var d = document; var account = d.getElementById('account').value; console.log(account); var password = d.getElementById('password').value; axios.post('/register.php',{ firstName:'cdd', password:'123456' }) .then(function (response) { console.log(response); d.getElementsByClassName('h3')[0].innerHTML = response.data; }) .catch(function (error) { console.log(error); }); }这个是php代码<?php
echo 'cdd的名字是:'.$_REQUEST['firstName'];?>总是出这样的错误Notice: Undefined index: firstName in D:\phpStudy\WWW\register.php on line 3cdd的id是:
添加回答
举报
0/150
提交
取消