首页 \ 问答 \ bootstrap4xpages中的select2控件?(select2 control in bootstrap4xpages?)

bootstrap4xpages中的select2控件?(select2 control in bootstrap4xpages?)

我感觉上周在IBM连接事件期间发布的bootstrap4xpages的版本应该包含一个select2控件但是现在我有点困惑,也许它只是在未来版本的管道中? 我找不到任何关于使用的例子,有谁知道这个? 一个代码示例将不胜感激。 PS! 我知道优秀的网络资源bootstrap4xpages.com但我找不到任何可以回答这些特定问题的内容,因为这些示例使用了旧版本的插件


I was under the impression the version of bootstrap4xpages that was released during the IBM connect event last week, should contain a select2 control But now I’m a bit confused, maybe it’s only in the pipeline for a future release? I cannot find any examples on usage, anyone who knows about this? A code example would be appreciated. PS! I’m aware of the excellent web resource bootstrap4xpages.com but I cannot find anything there that answers these particular questions as the examples uses an older version of the plugin


原文:https://stackoverflow.com/questions/21563846
更新时间:2022-06-30 12:06

最满意答案

如果变量没有return则无法将myFunc分配给变量

if (isset($_POST['action'])) {
  $data = myfunc();
  echo json_encode($data);
}

function myfunc(){
  return "Testfunc";
}

You can't assign myFunc to a variable if it doesn't return something

if (isset($_POST['action'])) {
  $data = myfunc();
  echo json_encode($data);
}

function myfunc(){
  return "Testfunc";
}

相关问答

更多
  • 对于任何需要类似问题帮助的人,我分享我是如何解决这个问题的...... HTML
  • 您是否尝试将代码包装在.ready(); 功能? $(document).ready(function(){ }); 这将确保jquery仅在页面加载时触发。 我怀疑它在所有元素存在之前过早发射因此无法正常工作。 新代码看起来像这样: $(document).ready(function(){ ...
  • 在构建响应的php脚本中,只需在对象中添加一个额外的属性,即要放入页面的html字符串,然后将javascript放在需要的位置。 你别无选择,只能在服务器上运行php函数。 In your php script that builds your response, just add an extra property to your object that is the html string you want to put into your page and then have javascript ...
  • 在Javascript中,所有未使用var声明的变量都将成为顶级全局变量。 当用var声明时,它们变为函数作用域。 没有任何有用的情况,你可能想要在函数体中声明全局变量,所以省去var几乎总是一个错误。 它导致所有写入同一变量的不同函数,并且通常不会很好地结束。 像jshint这样的静态分析器(也可用作在线工具 )会指出错误。 您应养成使用此类工具检查代码是否存在可避免错误的习惯。 In Javascript, all variables that are not declared with var bec ...
  • 如果变量没有return则无法将myFunc分配给变量 if (isset($_POST['action'])) { $data = myfunc(); echo json_encode($data); } function myfunc(){ return "Testfunc"; } You can't assign myFunc to a variable if it doesn't return something if (isset($_POST['action'])) { $d ...
  • 这是我的一个愚蠢的错误。 问题已解决。 虽然我包含了对AJAX扩展的引用,但是我忘记将用于ASMX服务的httphandler重写为ScriptHandlerFactory类。 添加这个解决了这个问题。 由于我收到了一些电子邮件询问例子或我如何解决这个问题,我写了一篇关于如何做这个汤的疯狂博客文章。 http://randomactsofcoding.blogspot.com/2009/03/jquery-json-and-asmx-20-services.html This was a stupid mi ...
  • 在你的PHP应该是 $list .= '
    '.$row["item"].'
    '; 然后在你的js部分输出就像这个 . 用于连接php中的字符串 In your php it should be $list .= '
    '.$row["item"].'
    '; and then output just like this in your js part . ...
  • 如果您添加以下代码,则此功能正常 $(document).ready(function() { $("input[name='emailAddress']").blur(function() { // Actual Email Validation function $('#emailMessage').html(""); var hasError = false; var emailaddressVal = $("input[name='email ...
  • 尝试从URL的开头删除点。 $.post('/delete-misc/test-ajax-code.php', ... 由于缺乏经验,我无法详细解释URL路径中的某个点是如何工作的,但我会将其制作为社区wiki,以便让某人解释它。 编辑:我问了一个关于这个话题的问题,答案很好: 一个点在网址中的含义是什么? Try to remove the dot from the beginning of the URL. $.post('/delete-misc/test-ajax-code.php', ... ...
  • 你有jQuery标记,所以让我们使用$.post因为你正在启用$_POST["functionname"] 。 $("form").submit( function(event) { event.preventDefault(); $.ajax({ type: "POST", url: 'sw.php', data: {"functionname": "saveTestObject"}, success: function(response) ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。