以下にて、テキストエリアの値を編集し、submitした先で、codeの値を取得すると
編集前の値になってしまいます。
編集後の値がPOSTされる方法を探しています。
html
1<html> 2<head> 3<script type="text/javascript" src="https://www.google.com/jsapi"></script> 4<script type="text/javascript">google.load('jquery', 1)</script> 5<script type="text/javascript" src="https://codemirror.net/lib/codemirror.js"></script> 6<script type="text/javascript" src="https://codemirror.net/mode/htmlmixed/htmlmixed.js"></script> 7<script type="text/javascript"> 8$(function(){ 9 editor = CodeMirror.fromTextArea(document.getElementById("code"), { 10 lineNumbers: true, 11 mode: "text/html", 12 matchBrackets: true 13 }); 14</script> 15 16</head> 17<body> 18 19<form method="post" action="index.php"> 20 21 <textarea name="code" id="code"><?php print_r($_SERVER, true) ?></textarea> 22 <input type="submit" value="submit"> 23 24</form> 25 26</body> 27</html>
あなたの回答
tips
プレビュー