这可能很容易,但我用谷歌搜索过,但没有找到或不明白如何做到这一点。可能是因为我真的不知道要搜索什么。在“将字段类型从 TEXT 更改为 LONGTEXT”等之后进行了搜索。
我有一个名为“setting”的表,里面有一个“行”,其中第一个值(“列”)是“setting_id”。
我想将字段值从文本编辑为使用 LONGTEXT。
我在这里用谷歌搜索和搜索,但没有找到答案。我找到了将列从使用 TEXT 更改为 LONGTEXT 的解决方案。但我认为这是错误的答案。但我不知道。
这就是它在 phpMyAdmin 中的样子。(见图)字段“值”需要使用 LONGTEXT,因为内容很长,不适合 TEXT。
我该怎么做呢?- 我真的很感谢你在这里帮助我。
我在这里得到了帮助来整理这段代码.它在Chrome,Safari和Internet Explorer中运行良好.但是在Firefox中,它会重定向到一个子URL(可能不是正确的词......)
我在页面上有脚本:

我想根据用户选择的值重定向到新页面(然后单击按钮):所以,如果我选择#2选项,我想到达这里:http://example.com/my-test- 2
它适用于其他浏览器,但不适用于Firefox.在Firefox中,它可以重定向到:http://example.com/test? redirect = http% 3A%2F%2Fexample.com%2Fmy-test-2, 这当然不会导致任何问题.
HTML在jquery和Bootstrap环境中加载,我在该页面上使用模态.我只是提到这个,以防Firefox使用那些framworks知道错误.
这是HTML:
I want to choose:
<form id="mychoice">
<input type="radio" name="redirect" value="http://example.com/my-test-1"><span>1</span><br>
<input type="radio" name="redirect" value="http://example.com/my-test-2"><span>2</span><br>
<input type="radio" name="redirect" value="http://example.com/my-test-3"><span>3</span><br>
<input type="radio" name="redirect" value="http://example.com/my-test-4"><span>4</span><br>
<input type="radio" name="redirect" value="http://example.com/my-test-5"><span>5</span><br /><br />
<input type="submit" value="See result">
</form>
Run Code Online (Sandbox Code Playgroud)
javascript:
$(document).ready(function(){
$("#mychoice").submit(function(){
event.preventDefault();
var loc = $('input[name="redirect"]:checked').val();
window.location = loc;
return false;
});
});
Run Code Online (Sandbox Code Playgroud)
你看到Firefox的行为是这样的吗?
如果有兴趣:我使用Chrome 42.0.2311.90(64位),Firefox 37.0.2和Windows 8.1 IE 11.09600.17728在Mac OSX 10.10.2上工作
我现在已经测试了很多东西,我知道这不是最佳的,但我需要从主页拖放到iframe。两者都在同一域中。
我已经使用 iframeFix 进行了测试,但要么我的浏览器(Chrome)不支持它,要么我做错了什么。
http://api.jqueryui.com/draggable/#option-iframeFix
<div id="mycontainer" class="mycontainer">
<iframe id="iframewindow" src="./child.html" frameborder="0" width="100%" height="100%"></iframe>
</div>
Run Code Online (Sandbox Code Playgroud)
在 iframe 中:
<div id="sortable">
<div class="portlet">
some content
</div>
</div>
Run Code Online (Sandbox Code Playgroud)
(我在 iframe 中使用 jQuery UI 进行排序。)
在主页中加载可拖动的脚本:
$(function() {
$( ".draggable" ).draggable({
connectToSortable: "#sortable",
helper: "clone",
iframeFix: true,
helper: function(event) {
return "<div class='custom-helper'>I move this</div>";
},
revert: "invalid",
});
$().disableSelection();
)};
Run Code Online (Sandbox Code Playgroud)
我已经测试过制作叠加等,但不知何故我还没有让它工作。
这是一种可以从 html 页面拖放到 iframe 的方法吗?(在所有浏览器中?)
如果另一个解决方案运行良好,我不需要 jQuery UI Draggable。