我有一个 aspx 页面,一旦单击按钮,我想启动一些 javascript。像这样。。
<p><input type='image' src='http://images.aviary.com/images/edit-photo.png' value='Edit photo' onclick="return launchEditor('imgClub', ' <%= imgClub.ImageUrl.ToString()%> ');" /></p>
javascript 如下(它是 Adobe 的 Aviary/Feather)
<script type='text/javascript'>
var featherEditor = new Aviary.Feather({
apiKey: 'your-key-here',
apiVersion: 3,
theme: 'dark', // Check out our new 'light' and 'dark' themes!
tools: 'all',
appendTo: '',
onSave: function(imageID, newURL) {
var img = document.getElementById(imageID);
img.src = newURL;
},
onError: function(errorObj) {
alert(errorObj.message);
}
});
function launchEditor(id, src) {
featherEditor.launch({
image: id,
url: src
});
return false;
}
</script>
问题是我<% imgClub.ImageUrl.ToString()%>
在
onclick="return launchEditor('imgClub', ' <%= imgClub.ImageUrl.ToString()%> ');"