更新:哇这是有史以来最快的回复,而且在几分钟之内就有很多答案.惊人.好的,这就是我想要做的. http://edvizenor.com/invoice33/
我想动态编辑这张发票,但当我点击顶部的蓝色框时,我想预览或在下一页上看到这个内容包含php var echo out.
这个蓝色框后面会改变为底部的按钮,但是我正在使用它进行测试.
如你所见它调用ajax脚本,但我需要将div的编辑内容发送到php var,我可以在预览页面上回显它.如果我可以把它放在php var中,我会在下一页上用它来做它.那有意义吗?谢谢你的快速回复.
是否可以获取div使用jQuery 的内容,然后将它们放在PHP var中以通过GET或POST发送?
我可以div像这样得到jQuery 的内容:
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>
$(document).ready(function()
{
$("#MyButton").click(function()
{
var htmlStr = $("#MyDiv").html();
});
});
</script>
Run Code Online (Sandbox Code Playgroud)
但是我如何将jQuery var放在php var中.我也需要通过BUTTON印刷机来做到这一点.这不包含在上面的代码中.我需要因为div文件是可更改的,当我点击UPDATE并通过PHP发送它需要有最新的内容.
有没有办法用jQuery从URL加载Html内容?
例如:
<div class="MyContent">
<html>
<head>
<title>Hello World Page</title>
</head>
<body>
Hello World
</body>
</html>
</div>
Run Code Online (Sandbox Code Playgroud)
我可以使用URL中的内容替换div中的所有HTML吗?
下面的代码使用as3 Air For Android从服务器下载mp3到手机.我想稍后在应用程序中使用这些文件,所以我有以下问题:
如何将文件保存到Android应用程序中的特定文件夹而不是用于选择位置的用户框?
import flash.net.FileReference;
/// It can be an mp3,jpg, png, etc... just change the url
/// and the extension name. nice huh?
var yourFileLocation = "http://YourWeb.com/YourSong.mp3";
var yourFileName = "YourSong.mp3";
var daFile:FileReference = new FileReference();
daFile.download(new URLRequest(yourFileLocation), yourFileName);
Run Code Online (Sandbox Code Playgroud)
监视这个进度也很好,当它启动,停止和进行时,但我认为eventListener可能会使用它.
我的问题: 是否有可能禁用div(Z-index 2),因此它仍然可见并使鼠标"无法察觉",因此我可以通过它(鼠标悬停,点击)实现鼠标操作到它下面的启用div?这意味着您可以单击下面的div,因为您的鼠标位于禁用的div顶部或鼠标悬停在顶部的div上,它将无关紧要或影响由它下面的div调用的鼠标悬停操作.
问题: 我在网上和stackoverflow上搜索过,无法找到我想要的简单答案.我有几个div和一些在不同的Z-index上相互重叠,而顶部的那些正在弄乱下面的那些动作.
示例: - 我在下部div(Z-Index 1)中有一个包含鼠标悬停操作的漂亮图形框.当鼠标悬停在盒子上时,它会触发操作. - - 我在新图层(Z-Index 2)上的div上的框上也有一些漂亮的图形文本,但这会干扰下面框中的鼠标悬停操作.这看起来好像我的鼠标离开了盒子,但它并没有只是在更高级别的div上.
问题摘要: 我可以禁用div,因此它不可点击或触发鼠标悬停调用,但仍然可见吗?
我有一些从数据库中获取的HTML.它在代码中有一个重要的换行符.这是必要的,因为有时会为一个问题保留一行,例如......"你呢?"<br>
问题是一些线条更长并且它们自动包裹导致有趣的格式化.当我在移动设备上显示它时,<br>会弄乱格式.这是它正在做的事情的图片.

是否有任何方法可以保持<br>并且没有更长的线条包裹并留下留下这些糟糕的空白空间?我可以使用PHP来替换某些东西或添加一些东西吗?
这是其中一天的输出代码:
<body>
<div id="date" align="center">12/18/14</div>
<div id="Mary">
<div id="Title">Daily Mass Readings</div>
<div id="Header">1st Reading:</div><div id="Verses">jer 23:5-8</div>
<div id="Content">Behold, the days are coming, says the LORD,<br>when I will raise up a righteous shoot to David;<br>As king he shall reign and govern wisely,<br>he shall do what is just and right in the land.<br>In his days Judah shall be saved,<br>Israel shall dwell in security.<br>This is the name they give him:<br>“The LORD our justice.”<br><br>Therefore, the …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用针对OneSignal服务的api向具有特定标签的用户发送推送通知:https://www.onesignal.com/
我似乎无法正确格式化数组.这是我拥有或想要的东西,但它不起作用:
"tags" => array[{"key": "NotifyLive", "relation": "=", "value": "true"}],
Run Code Online (Sandbox Code Playgroud)
因此,我希望将标记为"NotifyLive"的用户设置为"true".
我相信这可以做到,因为它在这里的文档中显示了它.向下滚动到标签:对象数组示例.我只是无法弄清楚如何编码这一行.
以下是我通过通知发送的字段:
$fields = array(
"app_id" => "example",
"android_sound" => "$num",
"big_picture" => "http://website.com/mypic.jpg",
"tags" => array[{"key": "NotifyLive", "relation": "=", "value": "true"}],// Doesn't work!
"data" => array("autoplay" => "true"),
"contents" => $content,
"headings" => $heading
);
Run Code Online (Sandbox Code Playgroud)
错误: 收到JSON:{"allresponses":"{\"errors \":[\"标签必须是数组.例如,[{\\"key \\":\\"gender \\",\\"relation \\":\\"= \\",\\"value \\":\\"male\\ "}] \"]}"}
该团队拥有惊人的支持,但我现在需要在工作时间之外得到答案.感谢您的任何见解.
我正在寻找如何将一个组合中的图层位置属性链接到另一个组合中的空位置属性。
我想使用airxzip,但我不知道如何下载源文件以及如果我这样做的话放在哪里.
我很抱歉成为这样的新手.
谢谢你尽你所能的帮助.
下面是我试图访问的zip/unzip as3代码的链接.
http://flex.coltware.com/2010/05/01/as3-zip-unzip-lib-airxzip/
下面是"解压缩"的示例,但我不知道如何下载要导入的文件.
// ActionScript file
import com.coltware.airxzip.ZipEntry;
import com.coltware.airxzip.ZipError;
import com.coltware.airxzip.ZipFileReader;
import com.coltware.airxzip.*;
import flash.filesystem.File;
import flash.utils.ByteArray;
use namespace zip_internal;
public function unzip_init(filename:String):ZipFileReader{
var reader:ZipFileReader = new ZipFileReader();
var file:File = File.desktopDirectory.resolvePath(filename);
reader.open(file);
return reader;
}
public function unzip_sample1():void{
var reader:ZipFileReader = unzip_init("new_airxzip.zip");
var list:Array = reader.getEntries();
for each(var entry:ZipEntry in list){
if(entry.isDirectory()){
log.debug("DIR --->" + entry.getFilename());
}
else{
log.debug("FILE --->" + entry.getFilename() + "(" + entry.getCompressRate() + ")");
}
}
}
public function unzip_sample2():void{ …Run Code Online (Sandbox Code Playgroud) 嗨,我希望替换我通过file_get_contents加载的html电子邮件中的单词
这是我的代码:
<?
$message = file_get_contents("http://www.MYwebsiteExample.com/EmailConfirmation.php");
$message = preg_replace('/SAD/', "HAPPY", $message);
// Also tried this below and it does not work either
$message = str_replace('/SAD/', "HAPPY", $message);
?>
Run Code Online (Sandbox Code Playgroud)
我希望找到SAD的所有模式(区分大小写)并用HAPPY替换它们.出于某种原因,如果我使用file_get_contents它似乎没有工作.
谢谢
更新:2013年1月22日
实际上,抱歉当我添加$时更正不起作用.它对我的代码不是必需的.我可以做一个解决方法,但这不起作用:
$message = str_replace("$SAD", "HAPPY", $message); /// does not work. Not sure why
$message = str_replace("SAD", "HAPPY", $message); /// without the $ it does work.
Run Code Online (Sandbox Code Playgroud) 下面的代码创建一个名为"circle"的MovieClip并检查它是否存在并通过removeChild()删除它; 它删除了圆圈,但[对象MovieClip]仍然存在.
如何检查孩子是否"在舞台上"或使用removeChild删除?
import flash.display.MovieClip;
import flash.events.MouseEvent;
var circle:MovieClip = new MovieClip();
circle.graphics.beginFill(0xFF794B);
circle.graphics.drawCircle(50, 50, 30);
circle.graphics.endFill();
addChild(circle);
circle.addEventListener(MouseEvent.CLICK, test);
function test(event:MouseEvent)
{
trace(circle);
if(circle)
{
trace("Called if Circle");
removeChild(circle);
}
trace(circle);
}
Run Code Online (Sandbox Code Playgroud) html ×4
php ×4
jquery ×3
flash ×2
actionscript ×1
addchild ×1
android ×1
clickable ×1
exists ×1
expression ×1
format ×1
formatting ×1
mouseover ×1
onesignal ×1
preg-replace ×1
removechild ×1
str-replace ×1
unzip ×1
url ×1
z-index ×1
zip ×1