获取form提交的返回值
获取form提交的返回值
HTML代码如下:
<form action="" method="post" enctype="multipart/form-data" class="adminedit" target="admin_ups"> <input type="file" name="fileName" class="editups" style="display:none"> </form> <iframe class="admin_ups" name="admin_ups" style="display:none"> </iframe>
JS代码如下:
$(".admin_ups").load(function(){ var str = $(".admin_ups").contents().text(); console.log(str);return; str = JSON.parse(str); console.log(str); return false; });