$(document).ready(function (e)
{
$("#upload_button").click(function(){
console.log("Clicked")
$.ajax({
url: 'http://192.168.1.126/JTV/upload/myfile.php',
type: 'POST',
data: {'assetid':assetid, 'imgurl':imgurl, 'mname':mname,
'videourl':videourl},
success: function(data)
{
console.log(data)
}
});
});
});
这是关于AJAX加载的HTML
function my_function(assetID,mname,imgurl,videourl)
{
$("#video_response").empty();
//alert("assetID:"+assetID+"\nMOvie name: "+mname+"\nImg
url:"+imgurl+"\nvideoURL:"+videourl)
element = "";
element += '<div align="center" style="padding-top:20px"><form>
<label for="mname">Video Name</label>  <input type="text"
name="mname" id="mname" placeholder="'+mname+'" style="color:black;
width: 300px; height: 30px; padding-left:5px">'
element += '<br><br><br><label for="imgurl">Image - URL
</label>  <input type="text" name="imgurl" id="imgurl"
value="'+imgurl+'" style="color:black; width: 300px; height: 30px;
padding-left:5px">'
element += '<input type="hidden" name="imgurl" id="imgurl"
Value="'+assetID+'" style="color:black; width: 300px; height:
30px; padding-left:5px">'
element += '<br><br><input type="button" id="edit_btn"
style="background:orange; color:white;height:30px;" value="Save
Changes"></form></div><div align="center" id="update_err"></div>';
$("#response").html( element );
}