function?prompt(str1,str2){
????window.open(,'_top','width=50,height=50....');
????document.write("<style?type="text/css">"+
????????????????"p,#pra{left:1px;}"+
????????????????"#submit{left:200px;}"+
????????????????"#cancel{left:250px;}"+
????????????????"</style>"
????????"<title>"+//獲取標題+"</title>"
????????????"<p>"+str1+"<p>"
????????????"<input?type?="text"?name?="getPran"?id="pra"?value="+"'"+str2+"'"+"/>"
????????????"<input?type?=?"submit"?value?="確認"?id?="submit">"+
????????????"<input?type?=?"cancel"?value?=?"取消"?id?=?"cancel">");
????var?flag?=?document.getElementById('submit');
????if(flag?!=?null){
????????return?documnet.getElementByName("getPra");
????????window.close();
????}else{
????????return?null;
????????window.close();
????}
}
2016-07-07
邏輯上是沒有問題的