问题描述
我根本不熟悉 html 并且有点卡住了。我将以下代码粘贴到 FileMaker 数据库程序中,并希望将自定义按钮转换为每 1 或 2 秒发生一次的定时函数。 或者甚至......如果有一种方法可以从 FileMaker 查询函数,这样我就可以在 FileMaker 数据库中放置一个按钮(发送按钮),因为用户希望将其作为布局。
nb - 我已经注释掉了一些按钮,因为我不确定我是否还在使用它们。
提前致谢!
<html lang="en">
<head>
<Meta charset="UTF-8">
<title>HTML Editor</title>
<!-- include libraries(jQuery,bootstrap) -->
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<!-- include summernote css/js -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/summernote.min.js"></script>
<!-- <link href="http://netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.css" rel="stylesheet">
<link href="http://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.11/summernote.css" rel="stylesheet"> -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/summernote.min.css" rel="stylesheet">
<link href="https://stackpath.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<div id="summernote">[[CONTENT]]</div>
<script>
// add a 'Save' button to the toolbar
var SaveButton = function (context) {
var ui = $.summernote.ui;
// create button
var button = ui.button({
contents: 'Send',tooltip: 'Save changes',click: function () {
//$('#summernote').summernote('code','code');
//window.alert('save changes');
/* Prep the URL to use for the hand-off to FM. */
var fullURL = '[[SAVEURL]]¶m=' + encodeURIComponent ($('#summernote').summernote('code'));
/* Send the data to FM. */
window.location = fullURL;
return false;
}
});
return button.render(); // return button as jquery object
}
$(document).ready(function() {
$('#summernote').summernote({
height: 300,tabsize: 2,toolbar: [
// [groupName,[list of button]]
['style',['style','bold','italic','underline','clear']],//['font',['strikethrough','superscript','subscript']],//['fontsize',['fontsize']],['color',['color']],//['para',['ul','ol','paragraph']],//['height',['height']],['insert',['link']],//['insert',['link','hr','table']],//['misc',['codeview']],['mybutton',['save']]
],buttons: {save: SaveButton}
});
});
</script>
</body>
</html>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)