框架中输入电话号码后按确定跳到一个网页。该怎么解决

WBOY
Release: 2016-06-13 10:37:39
Original
815 people have browsed it

框架中输入电话号码后按确定跳到一个网页。
怎样写HTML?
比如(这里填入手机号码)点击确认
会出现在下面这个链接里。http://www.xxxx.com/sds/sdfsd?fsd手机号码sdfr.eft.com

------解决方案--------------------

HTML code
<input id="phone_num"><input type="button" id="btn_submit" value="提交"><div id="result"></div><script>    var $ = function(id){return document.getElementById(id);}    $('btn_submit').onclick = function(){        var src = "http://www.xxxx.com/sds/sdfsd?fsdsdfr.eft.com";        $('result').innerHTML = src.replace(/sdsd/, "sd"+$('phone_num').value+"sd");    }</script><br><font color="#e78608">------解决方案--------------------</font><br>
Copy after login
HTML code
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>无标题文档</title><script>    function test(){        var tel = document.form.phone.value;        alert("phone-->>"+tel);        var url = "http://www.xxxx.com/sds/sdfsd?fsd"+tel+"sdfr.eft.com";        alert("url-->>"+url);    }</script>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template