#!/usr/local/bin/php
<!DOCTYPE html>
<html>
<head>
<script>
function sendInfoToChart()
{
document.getElementById("firstN").innerHTML=document.getElementById("firstName").innerHTML;
}
</script>
</head>
<body>
<form action="">
First name: <input type="text" name="firstName" id="firstName"><br>
<button onclick="sendInfoToChart()"> Submit </button>
</form>
<br><br>
<table border="1" cellpadding="4" style="font-style:italic;">
<tr><td><p id="firstN"></p></td><td>MiddleName</td><td>Last Name</td></tr>
</body>
</html>
我正在尝试传递在文本字段中输入的单词,并在您单击按钮时将其传递给表格。我不知道如何传递它......提前感谢您的帮助!