我正在 php 中处理地址簿。我有一个textarea,我希望当我点击或键入该textarea时,新窗口应该打开另一个表单,其中包含地址,城市,州,别针,国家和提交按钮等字段。
当我点击提交按钮时,我必须回到上一页。和地址,城市,...的组合应该在textarea
正如我已经做的那样
<script type="text/javascript">
$(function(){
$('textarea').on('keyup click',function(){
window.open("Open-New-window-while-Inserting-Address2.php");
});
});
</script>
答案 0 :(得分:0)
If you must do it this way, use a Modal instead of opening a new window. When the user "keysup" on from the Textarea, a modal would popup with whatever form you want it to display and when the user is done, you save the data with JS and load it into your TextArea.
答案 1 :(得分:-1)
In your page that contain your text area add the form information as a variables then if they are isset and not null write them with in your text area else print empty one.