我正在制作拖放功能。它在Firefox,谷歌Chrome,IE和Opera中运行良好,但Drop事件上的javascript没有在窗口Safari浏览器中触发。为什么会这样?
function fondrop(DID, event) {
alert("Dropped!");
if (FromID > 0) {
// stops the browser from redirecting off to the text.
if (event.preventDefault) {
event.preventDefault();
}
document.forms.hiddform.pFromID.value = FromID;
document.forms.hiddform.pToID.value = DID;
document.forms.hiddform.submit();
} else {
return;
}
}
HTML
<tr ondrop="fondrop(277677, event);" ondragover="fondragover(277677, event);" ondragenter="fondragover(277677, event);">
<td valign="top" nowrap="" ondragstart="fondragstart(277677, event);" id="TD277677">
</td>