预览用户键入的网页地址 [英] Preview a web page address typed by a user

查看:59
本文介绍了预览用户键入的网页地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我旁边有一个文本框和一个按钮.用户键入一个网页地址,并在单击按钮后打开一个新窗口,以预览用户键入的网页.

I have a textbox and a button next to it. The user types a web page address and upon clicking the button a new window is supposed to open up to preview the web page typed by the user. How do I do that?

推荐答案

这是您需要的JavaScript方法,并带有代码示例:
http://www.w3schools.com/jsref/met_win_open.asp [元素的属性value:
http://www.w3schools.com/tags/tag_input.asp [
Here is the JavaScript method you need, with a code sample:
http://www.w3schools.com/jsref/met_win_open.asp[^].

The URL from the new window should be taken from the attribute value of your <input type="text" /> element:
http://www.w3schools.com/tags/tag_input.asp[^].

That''s it.

—SA


感谢您的帮助.
使用您的信息,我就能使它起作用...

Thanks for your help.
Using your information I was able to get it to work...

<head runat="server">
    <title></title>
    <script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">


(document).ready(function(){
(document).ready(function () {


这篇关于预览用户键入的网页地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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