2013-07-17 50 views

回答

0

http://jsfiddle.net/Ultimate/WfrsN/

$('#prompt').click(function(){ 
    var name = prompt("Enter your name"); 
    if(name != ""){ 
     window.location = "http://www.example.com/" + name; 
    } else { 
     alert("You did not fill in a name!"); 
    } 
}); 

类似的东西?

+0

非常感谢你,帮了我很多! –