Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/90.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/unix/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html =5.1。*这一切现在都驻留在rails ujs中_Html - Fatal编程技术网

Html =5.1。*这一切现在都驻留在rails ujs中

Html =5.1。*这一切现在都驻留在rails ujs中,html,Html,是的 这有文件记录吗 背景:使用RoR助手,我犯了一个错误,并创建了带有data method='GET'的链接。每件事仍然有效,只是我在刷新页面时收到了重新发送数据的警告 现在我发现了这个奇怪的行为:data方法='GET' 与FF、IE、Chrome配合使用 这是标准吗?如果是的话,它会使轨道按钮与周围的所有表格一起废弃 编辑:我放弃说:_方法是由data方法组成的,这是作为数据发布的,如果我将“GET”改为a-让我们说“PUT”,我会得到RoR路由错误 另一个编辑:好的,我试着用一个更好的

是的

这有文件记录吗

背景:使用RoR助手,我犯了一个错误,并创建了带有data method='GET'的链接。每件事仍然有效,只是我在刷新页面时收到了重新发送数据的警告

现在我发现了这个奇怪的行为:data方法='GET' 与FF、IE、Chrome配合使用

这是标准吗?如果是的话,它会使轨道按钮与周围的所有表格一起废弃

编辑:我放弃说:_方法是由data方法组成的,这是作为数据发布的,如果我将“GET”改为a-让我们说“PUT”,我会得到RoR路由错误

另一个编辑:好的,我试着用一个更好的例子来解释:

下一行

"<a data-method='PUT'  href='?'>post</a>"
以_method='PUT'作为数据创建POST请求


不,这不是标准,只要你说RAILS Jquery_ujs.js不是标准

Rails/Jquery正发挥着神奇的作用:

如果你看看这里,所有的魔法都消失了

 $.rails = rails = {
    // Link elements bound by jquery-ujs
    linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote], a[data-disable-with], a[data-disable]',

    // Button elements bound by jquery-ujs
    buttonClickSelector: 'button[data-remote], button[data-confirm]',

    // Select elements bound by jquery-ujs
    inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',

    // Form elements bound by jquery-ujs
    formSubmitSelector: 'form',

    // Form input elements bound by jquery-ujs
    formInputClickSelector: 'form input[type=submit], form input[type=image], form button[type=submit], form button:not([type])',

    // Form input elements disabled during form submission
    disableSelector: 'input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled',

    // Form input elements re-enabled after form submission
    enableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled',

    // Form required input elements
    requiredInputSelector: 'input[name][required]:not([disabled]),textarea[name][required]:not([disabled])',

    // Form file input elements
    fileInputSelector: 'input[type=file]',

    // Link onClick disable selector with possible reenable after remote submission
    linkDisableSelector: 'a[data-disable-with], a[data-disable]',

    // Button onClick disable selector with possible reenable after remote submission
    buttonDisableSelector: 'button[data-remote][data-disable-with], button[data-remote][data-disable]',

你需要更清楚地解释这个问题。@ArtOfCode:这不是问题,更像是一个“哇”,如果你用属性“数据方法”创建一个,链接就不会“得到”它的“帖子”。故事结束了。尝试一下rails>=5.1。*这一切现在都驻留在rails ujs中