用javascript如何自动替换代码? 不太明白你的意思,你是指地址栏的还是指用户填写的内容 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <html> <head> <meta http-equiv="Content-Language" content="ja"> <meta http-equiv="Content-Type" content="text/html; charset=shift_jis"> <title>text</title> </head> <script>var reg=/(https?:\/\/\S+)/gifunction Replace(){ var ta=document.getElementById("ta"); ta.value=ta.value.replace(reg,"http://www.yi13.cn/tu?url=$1");}</script><body> <textarea style="width:200px;height:120px" id="ta"></textarea><br/><input type='button' value='ClickMe' onclick='Replace()'/></body> </html> 表单提交 html界面元素包括activeX控件完全加载完成之后响应什么事件 Ext4.0 树形过滤怎样实现 文本显示的问题 奇怪的问题,朋友请帮忙看下 谢谢 如何用javascript脚本控制框架的拉伸 怎么能够输入网址使页面自动无工具栏、地址栏、只有关闭最大化和最小化呢 请问我的一个前台的js取值问题!! 能不能在onload事件中自动submit表单? 请问Applet的数据能否下载到本地硬盘上?如股票图,外汇图的数据等等,多谢!! JavaScript正则表达式的从数据中取得字符匹配的问题 js 特殊字符检测
<head>
<meta http-equiv="Content-Language" content="ja">
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis">
<title>text</title>
</head>
<script>
var reg=/(https?:\/\/\S+)/gi
function Replace()
{
var ta=document.getElementById("ta");
ta.value=ta.value.replace(reg,"http://www.yi13.cn/tu?url=$1");
}
</script>
<body>
<textarea style="width:200px;height:120px" id="ta"></textarea><br/>
<input type='button' value='ClickMe' onclick='Replace()'/>
</body>
</html>