"함수 redirect()"의 두 판 사이의 차이

잔글 (Jmnote님이 Location.href 문서를 함수 redirect() 문서로 이동했습니다)
잔글 (봇: 자동으로 텍스트 교체 (-source +syntaxhighlight))
 
8번째 줄: 8번째 줄:
==C#==
==C#==
[[category: Csharp]]
[[category: Csharp]]
<source lang='csharp'>
<syntaxhighlight lang='csharp'>
webBrowser1.Url = new Uri(url1);
webBrowser1.Url = new Uri(url1);
</source>
</syntaxhighlight>


==Java==
==Java==
===JSP===
===JSP===
<source lang='jsp'>
<syntaxhighlight lang='jsp'>
<%
<%
response.redirect("******.jsp");
response.redirect("******.jsp");
%>
%>
</source>
</syntaxhighlight>


===ADT===
===ADT===
[[category: ADT]]
[[category: ADT]]
<source lang='java'>
<syntaxhighlight lang='java'>
WebView wv = (WebView) this.findViewById(R.id.webView1);
WebView wv = (WebView) this.findViewById(R.id.webView1);
wv.setWebViewClient(new WebViewClient(){});
wv.setWebViewClient(new WebViewClient(){});
wv.loadUrl("http://example.com");
wv.loadUrl("http://example.com");
</source>
</syntaxhighlight>


==JavaScript==
==JavaScript==
[[category: JavaScript]]
[[category: JavaScript]]
<source lang='javascript'>
<syntaxhighlight lang='javascript'>
myframe.location.href="http://example.com";
myframe.location.href="http://example.com";
</source>
</syntaxhighlight>


==jQuery==
==jQuery==
[[category: jQuery]]
[[category: jQuery]]
<source lang='jquery'>
<syntaxhighlight lang='jquery'>
$('#myframe').attr('src', 'http://example.com');
$('#myframe').attr('src', 'http://example.com');
</source>
</syntaxhighlight>


==PHP==
==PHP==
[[category: PHP]]
[[category: PHP]]
<source lang='php'>
<syntaxhighlight lang='php'>
function goto_url($url, $seconds=0) {
function goto_url($url, $seconds=0) {
   die("<meta http-equiv='REFRESH' content='$seconds;url=$url'>");
   die("<meta http-equiv='REFRESH' content='$seconds;url=$url'>");
}
}
</source>
</syntaxhighlight>
<source lang='php'>
<syntaxhighlight lang='php'>
function goto_url($url) {
function goto_url($url) {
   die("<script>location.href='$url';</script>");
   die("<script>location.href='$url';</script>");
}
}
</source>
</syntaxhighlight>


==같이 보기==
==같이 보기==
*[[HTML 페이지 이동]]
*[[HTML 페이지 이동]]
*[[PHP goto_url]]
*[[PHP goto_url]]

2020년 11월 2일 (월) 02:36 기준 최신판

url
goto_url
location.href
Webview
WebBrowser

1 C#[ | ]

webBrowser1.Url = new Uri(url1);

2 Java[ | ]

2.1 JSP[ | ]

<%
response.redirect("******.jsp");
%>

2.2 ADT[ | ]

WebView wv = (WebView) this.findViewById(R.id.webView1);
wv.setWebViewClient(new WebViewClient(){});
wv.loadUrl("http://example.com");

3 JavaScript[ | ]

myframe.location.href="http://example.com";

4 jQuery[ | ]

$('#myframe').attr('src', 'http://example.com');

5 PHP[ | ]

function goto_url($url, $seconds=0) {
  die("<meta http-equiv='REFRESH' content='$seconds;url=$url'>");
}
function goto_url($url) {
  die("<script>location.href='$url';</script>");
}

6 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}