<head>
<meta charset="utf-8" />
<title>jQuery UI Dialog - Modal form</title>
<script type="text/javascript" src="Handoverscript.js"></script>
</head>
<body>
<div id="dialog-form" title="Create New User">
<form onsubmit="return validateForm()" name="myForm" method="post">
<label for="Miscellaneous">UserName*:</label>
<textarea name="textarea" id="Miscellaneous" class="text ui-widget-content ui-corner-all" ></textarea>
<label for="HighPriorityIssues">First Name*:</label>
<textarea name="textarea" id="HighPriorityIssues" class="text ui-widget-content ui-corner-all" ></textarea>
<label for="CR">Second Name* :</label>
<textarea name="textarea" id="CR" class="text ui-widget-content ui-corner-all" ></textarea>
<label for="Severity">Surname* :</label>
<textarea name="textarea" id="Severity" class="text ui-widget-content ui-corner-all" ></textarea>
<label for="DateOfUpdate">Date of update :</label>
<input type="text" id="datepicker" >
<label for="DateOfUpdate">Update By :</label>
<input type="text" id="updateBy" >
<label for="DateOfUpdate">Update :</label>
<input type="text" id="update" >
<label for="DateOfUpdate">Owned By :</label>
<input type="text" id="ownedBy" >
</form>
</div>
<div id="users-contain" class="ui-widget">
<h1>User Details:</h1>
<button id="view">View</button>
<button id="send">Send</button>
<button id="create-user">Create</button>
<button id="download">Download</button>
<label for="search">Search :</label><input type="text" />
<table id="users" class="ui-widget ui-widget-content">
<thead>
<tr class="ui-widget-header ">
<th><input type="checkbox" onchange = "checkAll(this);" name="chk[]"></th>
<th>User Name</th>
<th>First Name/th>
<th>Second Name</th>
<th>Surname</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="checkbox" onchange="Check_Click(this);"/> </td>
<td>X</td>
<td>Y</td>
<td>Z</td>
<td>XYZ</td>
<td><a class="edit" href="">Edit</a>
</td>
<td><span class="delete"><a href="">Delete</a></span>
</td>
</tr>
</tbody>
</table>
</div>
</body>
Java Scrpit文件:
$(function () {
var new_dialog = function (type, row) {
var dlg = $("#dialog-form").clone();
var miscellaneous = dlg.find(("#Miscellaneous")),
highPriorityIssues = dlg.find(("#HighPriorityIssues")),
cr = dlg.find(("#CR")),
severity = dlg.find(("#Severity"));
type = type || 'Add ';
var config = {
autoOpen: true,
height: 600,
width: 350,
modal: true,
buttons: {
"Save": save_data,
"Cancel": function () {
dlg.dialog("close");
}
},
close: function () {
dlg.remove();
}
};
if (type === 'Edit') {
config.title = "Edit a Handover";
get_data();
delete(config.buttons['Create an account']);
config.buttons['Save'] = function () {
row.remove();
save_data();
};
}
dlg.dialog(config);
在这种情况下,当我点击“创建”按钮时,它将打开一个对话框,此框代码位于java脚本文件中 我想刮保存和取消按钮这些按钮是在java脚本文件中可以任何人帮我如何使用Jsoup刮这些按钮下面附图显示说明。 ![在此处输入图像说明] [10]