我正在尝试将pixlr API集成到我的网站中,并在网站上提供一些文档。当我点击一个图像来加载图像编辑器时,它说你所寻找的页面不存在。你知道我为什么会得到这个吗?这是我的网页:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <title>Designer Test</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <script type="text/javascript" src="js/pixlr.js"></script>
    <script type="text/javascript">
        pixlr.settings.target = 'http://xxxxxxx.com/designer/php/savefile.php';
        pixlr.settings.exit = 'http://xxxxxx.com/designer';
        pixlr.settings.method = 'post';
        pixlr.settings.locktarget = true;
    </script>
</head>
<body>
<h4>Click the image to edit</h4>
<br />
<b>Open image editor overlay</b><br />
<a href="javascript:pixlr.overlay.show({image:'http://xxxxxxx.com/designer/images/roofCrafters.png', title:'Roof Crafters'});"><img src="images/roofCrafters.png" width="250" height="150" title="Edit in pixlr" /></a><br /><br />
<br /><br />
</body>
</html>

最佳答案

您应该在url中添加要使用的服务,例如:

<a href="javascript:pixlr.overlay.show({image:'http://xxxxxxx.com/designer/images/roofCrafters.png', title:'Roof Crafters', service:'editor'});">

您可以使用“editor”或“express”

关于javascript - Pixlr API集成,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/5572996/

10-13 09:04