ajaxでhtmlサイトを送ろうとしているのですが、サーバー側でcssの構造が壊れています。
私のgetInfo関数は、次のように見えるhtmlテキストを含む変数を返します
<div id="Center">center<button style="margin-left: 109px; margin-top: -9px; position: absolute;">juhu</button></div>
この変数を ajax で php ページに送信します。
$.ajax({
url:"createFile.php",
type:"post",
dataType:"text",
data:getInfo()
});
しかし、サーバー サイト (php ページ) では、post 変数の値は次のようになります。
<div id="Center">center<button absolute;\"="" position:="" -9px;="" margin-top:="" 109px;="" style="\"margin-left:" xmlns="\"http://www.w3.org/1999/xhtml\"">juhu</button></div>
なにが問題ですか?ありがとう