在asp.net网站中,如何在没有runatserver属性的情况下使标签的href动态化 [英] How to make href of tag dynamic without runatserver property in asp.net website

查看:129
本文介绍了在asp.net网站中,如何在没有runatserver属性的情况下使标签的href动态化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在asp.net网站上如何在没有runatserver属性的情况下使标记的href动态化.


How to make href of tag dynamic without runatserver property in asp.net website.


<a style="display: block; href="../video/news.flv"

         width: 496px; height: 300px" id="player"></a>




在这里,我想使
动态成为href.我通过添加runatserver属性来实现此功能.但是那时候我的视频播放器无法正常工作.

请帮我




Here I want to make href of Dynamic .I get this by adding runatserver property.But that time my video player is not working properly.

Pls Help me

推荐答案

您仍然可以使用javascript函数绑定动态href

you can still use the javascript function to bind dynamic href

Send the value to the function:


function BindDynamicHref(URL){
window.location.href = "http://www."+URL;
}


And call the function like so:


onclick="BindDynamicHref('desiredwebiste.com');"



希望这能解决您的问题.



Hope this will resolve your issue.


这篇关于在asp.net网站中,如何在没有runatserver属性的情况下使标签的href动态化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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