我有一个小问题,我猜在我看来听起来很愚蠢。其实我也该代码javascript button ajax和php
<script type="text/javascript">
$(document).ready(function(){
var email_value = prompt('Please enter your email address');
if(email_value !== null){
//post the field with ajax
$.ajax({
url: '="/new/cfolder.php',
type: 'POST',
dataType: 'text',
data: {data : email_value},
success: function(response){
//do anything with the response
console.log(response);
}
});
}
});
</script>
我想将其链接到我的按钮,这是否
<form action="/new/cfolder.php" method="post">
</font><input type="submit" value="Create Vdisk" class="myButton6" onClick="function()">
<br></form>
它实际上是有可能做到这一点?谢谢你的回答。
我做了什么你已经做了,但它只是刷新我的网页。 –