日期:2014-05-16 浏览次数:20411 次
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>表单编辑 </title>
<script src="http://code.jquery.com/jquery-1.8.0.min.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
function Button1_onclick() {
saveForm2(".content");
}
function saveForm2(contentCss) {
inputList = $("input");
for (var item = 0; item < inputList.length; item++) {
inputList.eq(item).val(inputList.eq(item).val());
}
inputList = $("input:checked")
for (var item = 0; item < inputList.length; item++) {
inputList.eq(item).attr("checked", "checked");
}
var postData = { "type": "add" };
postData.value = escape($(contentCss).html());
alert(postData.value); // John
// $.post(
// serviceUrl
// , postData
// , function (data) {
// alert("保存成功"); // John
// }
// , "json");
}
</script>
</head>
<body>
<form name="form1" method="post" action="editForm.aspx" id="form1">
<div>
</div>
<div class="control" style="background-color: #cccccc; width: 100%">
<input id="Button1" type="button" value="保存表单" onclick="return Button1_onclick()" />
</div>
<div id="divContent" class="content" style="">
&nb