我可以将数据输入PROMPT并根据输入的值打开一个窗口吗? [英] Can I enter data into a PROMPT and have it open a window based on the value entered?

查看:61
本文介绍了我可以将数据输入PROMPT并根据输入的值打开一个窗口吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我查看了很多JavaScripts,我似乎找不到确切的

我正在寻找的东西。这可能是如此简单,以至于我的脑袋正好超过

但另一方面,我不确定是否可以使用

JavaScript来完成。


我目前有一个照片修复/修饰网站。我通常

向我的客户发送一封电子邮件,其中包含经过修改的

照片的证明以供他们批准。我没有通过电子邮件向他们发送证据,而是希望他们能够从我的网站上访问他们的证据。当

照片准备好批准时,我会创建一个基于

客户电话号码的html页面并向他们发送一封包含
的电子邮件。
链接到我的网站。

客户随后将访问我的网页客户证明

(例如)。在那个页面上,他们会输入他们的电话号码

,按下回车后,我创建的弹出窗口将会打开,显示润饰后的照片。


这可能与JavaScript有关,还是我需要在我的网络服务器上创建一些

类型的数据库?


谢谢

Tom

I have looked at many JavaScripts and I cannot seem to find exactly
what I am looking for. It might be so simple that it went right over
my head but on the other hand, I am not sure if this can be done using
JavaScript.

I currently have a photo restoration/retouching website. I normally
send my customers an email containing a proof of the retouched
photograph for their approval. Instead of emailing them the proof, I
would like them to be able to access their proof from my website. When
the photo is ready for approval, I would create an html page based on
the customer''s telephone number and send them an email cotaining a
link to my website.
The customer would then access my web page called "customer proofs"
(for example). On that page, they would enter their telephone number
and after pressing enter, the popup window that I created previoulsy
will open, displaying the retouched photograph.
Is this possible to do with JavaScript or would I need to create some
type of database on my web server?

Thanks
Tom

推荐答案

Tom Jenkins写道:
Tom Jenkins wrote:
我看了很多JavaScripts和我似乎无法找到我正在寻找的东西。它可能是如此简单,以至于它直接过了我的头,但另一方面,我不确定是否可以使用
JavaScript来完成。
I have looked at many JavaScripts and I cannot seem to find exactly
what I am looking for. It might be so simple that it went right over
my head but on the other hand, I am not sure if this can be done using
JavaScript.




phoneNumber =提示符(''你的电话号码是什么?'',''### - ### - ####'');

document.location.href = ''http:// pathToFiles /''+ phoneNumber +''。html'';


-

Randy

comp.lang.javascript常见问题 - http://jibbering.com/faq


Randy Webb于2004年6月26日在comp.lang.javascript中写道
Randy Webb wrote on 26 sep 2004 in comp.lang.javascript:
Tom Jenkins写道:
Tom Jenkins wrote:
我看了很多JavaScripts,我似乎无法找到我正在寻找的东西。它可能是如此简单,以至于它直接过了我的头,但另一方面,我不确定是否可以使用
JavaScript来完成。
I have looked at many JavaScripts and I cannot seem to find exactly
what I am looking for. It might be so simple that it went right over
my head but on the other hand, I am not sure if this can be done using
JavaScript.



phoneNumber =提示符(''你的电话号码是什么?'',''### - ### - ####'');
document.location.href =''http:// pathToFiles / ''+ phoneNumber +''。html'';



phoneNumber=prompt(''Whats your phone number?'',''###-###-####'');
document.location.href= ''http://pathToFiles/'' + phoneNumber + ''.html'';




为什么我觉得你认为这不是一个多国NG?

-

Evertjan。

荷兰。

(请在我的电子邮件地址中将x'变为点数,

但让我们继续讨论新闻组)



Why do I get the feeling you think this is not an multinational NG ?
--
Evertjan.
The Netherlands.
(Please change the x''es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)


Tom Jenkins写道:

[snip]
Tom Jenkins wrote:
[snip]
...我不希望通过电子邮件向他们发送证据,我希望他们能够从我的网站上访问他们的证据。当照片准备好批准时,我会根据客户的电话号码创建一个html页面,并向他们发送一封电子邮件,链接到我的网站。
>然后,客户将访问我的名为客户证明的网页(例如)。在那个页面上,他们会输入他们的电话号码
,按下回车后,我创建的弹出窗口将会打开,显示修改过的照片。
... Instead of emailing them the proof, I
would like them to be able to access their proof from my website. When
the photo is ready for approval, I would create an html page based on
the customer''s telephone number and send them an email cotaining a
link to my website.
The customer would then access my web page called "customer proofs"
(for example). On that page, they would enter their telephone number
and after pressing enter, the popup window that I created previoulsy
will open, displaying the retouched photograph.



[snip]


为什么不使用一些随机生成的字符串来使URL唯一?

像pageZX76jiX.hmtl这样的东西。然后在电子邮件中包含该链接。

您的用户然后点击电子邮件中的链接(或复制并粘贴)

以查看该页面。 />

此方法解决的其他问题:


1.如何为单个客户创建多个页面

只有一个电话号码?


2.如何阻止客户输入其他客户的电话号码

来访问他们的图片?


为了让您的网站更安全,您是否考虑过添加

用户名&密码?


干杯,弗雷德。


[snip]

Why not use some randomly generated string to make the URL unique?
Something like "pageZX76jiX.hmtl" then include the link in the e-mail.
Your users then click on the link in the email (or copy and paste it)
to view the page.

Other issues this approach addresses:

1. How will you create multiple pages for a single customer that has
only one phone number?

2. How do you stop clients from entering other clients'' phone numbers
to access their images?

To make your site much more secure, have you considered adding
usernames & passwords?

Cheers, Fred.


这篇关于我可以将数据输入PROMPT并根据输入的值打开一个窗口吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆